Skip to content

[pre-commit.ci] pre-commit autoupdate #270

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #270

Workflow file for this run

name: Tests
on: push
concurrency:
group: test-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- run: pip install -e .[tests]
- run: python -m pytest --cov=sme_contrib --cov-report=xml -v
- uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
name: ${{ matrix.os }}-${{ matrix.python-version }}
fail_ci_if_error: true
verbose: true
# https://stackoverflow.com/questions/12844451/test-test-coverage-with-python-in-sonar-not-showing-up
- run: coverage xml -i
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'
- uses: sonarsource/sonarcloud-github-action@master
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}