|
16 | 16 | runs-on: ${{ matrix.os }}
|
17 | 17 | strategy:
|
18 | 18 | matrix:
|
19 |
| - python-version: ["3.12"] #, "3.11", "3.10", "3.9"] |
20 |
| - os: [ubuntu-latest] #, macOS-latest, windows-latest] |
| 19 | + python-version: ["3.12", "3.11", "3.10", "3.9"] |
| 20 | + os: [ubuntu-latest, macOS-latest, windows-latest] |
21 | 21 | fail-fast: false
|
22 | 22 |
|
23 | 23 | steps:
|
|
29 | 29 | - name: Install dependencies
|
30 | 30 | run: |
|
31 | 31 | pdm install -dG test
|
32 |
| - - name: Run Tests |
| 32 | + - name: Run Tests |
33 | 33 | run: |
|
34 |
| - pdm run pytest |
| 34 | + pdm run pytest |
| 35 | + coverage: |
| 36 | + needs: ci |
| 37 | + runs-on: ubuntu-latest |
| 38 | + strategy: |
| 39 | + matrix: |
| 40 | + python-version: ["3.12"] |
| 41 | + steps: |
| 42 | + - uses: actions/checkout@v4 |
| 43 | + - name: Set up PDM |
| 44 | + uses: pdm-project/setup-pdm@v4 |
| 45 | + with: |
| 46 | + python-version: ${{ matrix.python-version }} |
| 47 | + - name: Install dependencies |
| 48 | + run: | |
| 49 | + pdm install -dG test |
| 50 | + # See: https://remarkablemark.org/blog/2023/10/14/setup-codeclimate-with-github-actions/ |
| 51 | + - uses: remarkablemark/setup-codeclimate@v2 |
| 52 | + - name: Run Tests and report to CodeClimate |
| 53 | + run: | |
| 54 | + cc-test-reporter before-build |
| 55 | + pdm run pytest |
| 56 | + cc-test-reporter after-build --exit-code $? |
| 57 | + env: |
| 58 | + CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} |
| 59 | + |
| 60 | + # See: https://martinheinz.dev/blog/69 "Ultimate CI Pipeline for All of Your Python Projects" |
| 61 | + - name: Use Codecov to track coverage |
| 62 | + uses: codecov/codecov-action@v4 |
| 63 | + with: |
| 64 | + token: ${{ secrets.CODECOV_TOKEN }} |
| 65 | + files: ./coverage.xml # coverage report |
| 66 | + |
| 67 | + - name: SonarCloud scanner |
| 68 | + uses: sonarsource/sonarcloud-github-action@master |
| 69 | + env: |
| 70 | + GITHUB_TOKEN: ${?{ secrets.GITHUB_TOKEN }} |
| 71 | + SONAR_TOKEN: ${?{ secrets.SONAR_TOKEN }} |
0 commit comments