|
| 1 | +name: Runner Tests |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [main] |
| 6 | + pull_request: |
| 7 | + branches: [main, "release/*"] |
| 8 | + |
| 9 | +jobs: |
| 10 | + run_tests_ubuntu: |
| 11 | + runs-on: ${{ matrix.os }} |
| 12 | + |
| 13 | + strategy: |
| 14 | + fail-fast: false |
| 15 | + matrix: |
| 16 | + os: [ubuntu-latest, ubuntu-20.04, macos-latest, windows-latest] |
| 17 | + python-version: ["3.8", "3.9", "3.10"] |
| 18 | + |
| 19 | + steps: |
| 20 | + - name: Checkout |
| 21 | + uses: actions/checkout@v3 |
| 22 | + |
| 23 | + - name: Set up Python ${{ matrix.python-version }} |
| 24 | + uses: actions/setup-python@v4 |
| 25 | + with: |
| 26 | + python-version: ${{ matrix.python-version }} |
| 27 | + |
| 28 | + - name: Install dependencies |
| 29 | + run: | |
| 30 | + python -m pip install --upgrade pip |
| 31 | + pip install -r runner-requirements.txt |
| 32 | + pip install pytest |
| 33 | + pip install sh |
| 34 | + pip install -e . |
| 35 | +
|
| 36 | + - name: List dependencies |
| 37 | + run: | |
| 38 | + python -m pip list |
| 39 | +
|
| 40 | + - name: Run pytest |
| 41 | + run: | |
| 42 | + pytest -v runner |
| 43 | +
|
| 44 | + # upload code coverage report |
| 45 | + code-coverage-runner: |
| 46 | + runs-on: ubuntu-latest |
| 47 | + |
| 48 | + steps: |
| 49 | + - name: Checkout |
| 50 | + uses: actions/checkout@v3 |
| 51 | + |
| 52 | + - name: Set up Python 3.10 |
| 53 | + uses: actions/setup-python@v4 |
| 54 | + with: |
| 55 | + python-version: "3.10" |
| 56 | + |
| 57 | + - name: Install dependencies |
| 58 | + run: | |
| 59 | + python -m pip install --upgrade pip |
| 60 | + pip install -r runner-requirements.txt |
| 61 | + pip install pytest |
| 62 | + pip install pytest-cov[toml] |
| 63 | + pip install sh |
| 64 | + pip install -e . |
| 65 | +
|
| 66 | + - name: Run tests and collect coverage |
| 67 | + run: pytest runner --cov runner # NEEDS TO BE UPDATED WHEN CHANGING THE NAME OF "src" FOLDER |
| 68 | + |
| 69 | + - name: Upload coverage to Codecov |
| 70 | + uses: codecov/codecov-action@v3 |
| 71 | + with: |
| 72 | + name: codecov-runner |
| 73 | + verbose: true |
| 74 | + fail_ci_if_error: true |
0 commit comments