unit test gateway job
@@ -6,13 +6,33 @@ on:
jobs:
+ tests:
+ runs-on: ubuntu-22.04
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v3
+ - name: Setup Python
+ uses: actions/setup-python@v4
+ - name: Python Version
+ run: python --version
+ - name: Update Pip
+ run: python -m pip install --upgrade pip
+ - name: Install dependencies
+ run: pip install -r requirements.txt
+ - name: Install rsatoolbox
+ run: pip install .
+ - name: Install test dependencies
+ run: pip install -r tests/requirements.txt
+ - name: Unit tests
+ run: pytest
+
source:
+ needs: tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10']
os: [ubuntu-latest, macos-latest, windows-latest]
-
steps:
- uses: actions/checkout@v3
- name: Setup Python
@@ -48,12 +68,12 @@ jobs:
retention-days: 1
binaries:
+ needs: tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10']
os: [ubuntu-latest, macos-latest, windows-latest]
-
steps:
- uses: actions/checkout@v3
- name: Setup Python
@@ -77,4 +97,3 @@ jobs:
path: dist/*.whl
if-no-files-found: error
retention-days: 1
-
