Update test github action #74
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Tests | ||
|
Check failure on line 1 in .github/workflows/test.yml
|
||
| on: ["push", "pull_request"] | ||
| jobs: | ||
| test: | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| matrix: | ||
| os: [ubuntu-latest, windows-latest] | ||
| python: [2.7, 3.13] | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| - name: Install python ${{ matrix.python }} with LisardByte/setup_python action | ||
| if: matrix.python <= 2.7 | ||
| uses: LizardByte/actions/actions/setup_python@master | ||
| with: | ||
| python-version: ${{ matrix.python }} | ||
| - name: Install python ${{ matrix.python }} with standard setup-python action | ||
| if: matrix.python > 2.7 | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: ${{ matrix.python }} | ||
| - name: Install dependencies | ||
| run: | | ||
| pip install -U -r requirements_dev.txt | ||
| pip install -U -e . | ||
| - name: Run tests | ||
| run: | | ||
| make test | ||
| - name: Run coverage | ||
| if: matrix.os == "ubuntu-latest" | ||
| run: | | ||
| coverage lcov -o .coverage.lcov | ||
| - name: Coveralls Parallel | ||
| if: matrix.os == "ubuntu-latest" | ||
| uses: coverallsapp/github-action@v2 | ||
| with: | ||
| github-token: ${{ secrets.github_token }} | ||
| path-to-lcov: ./.coverage.lcov | ||
| flag-name: run-${{ matrix.os }}-${{ matrix.python }} | ||
| parallel: true | ||
| finish: | ||
| needs: test | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Coveralls Finished | ||
| uses: coverallsapp/github-action@v2 | ||
| with: | ||
| github-token: ${{ secrets.github_token }} | ||
| path-to-lcov: ./.coverage.lcov | ||
| parallel-finished: true | ||