split linters and tests #1
Workflow file for this run
This file contains 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 | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.11"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pytest pytest-cov | |
if [ -f .devcontainer/requirements.txt ]; then pip install -r .devcontainer/requirements.txt; fi | |
- name: Test with pytest | |
run: | | |
pytest | |
- name: Build coverage file | |
run: | | |
pytest --junitxml=pytest.xml --cov-report=term-missing:skip-covered --cov-report "xml:coverage.xml" --cov=src src/tests/ | tee pytest-coverage.txt | |
- name: Pytest coverage comment | |
uses: MishaKav/pytest-coverage-comment@main | |
with: | |
pytest-coverage-path: ./pytest-coverage.txt | |
junitxml-path: ./pytest.xml |