Skip to content

[pre-commit.ci] auto fixes from pre-commit.com hooks #213

[pre-commit.ci] auto fixes from pre-commit.com hooks

[pre-commit.ci] auto fixes from pre-commit.com hooks #213

Workflow file for this run

name: Tests
on: push
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.8, 3.9]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- run: pip install -r requirements.txt
- run: pip install -r dev-requirements.txt
- run: python -m pytest --cov=mease_elabftw --cov-report=xml -v
env:
ELABFTW_TOKEN: ${{ secrets.ELABFTW_WRITE_TOKEN }}
- uses: codecov/codecov-action@v2
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.9
- uses: sonarsource/sonarcloud-github-action@master
if: matrix.os == 'ubuntu-latest' && matrix.python-version == 3.9
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}