Attempted fix in workflow-yaml file (3). #476
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, pull_request] | |
jobs: | |
code-quality: | |
name: code-quality | |
runs-on: ubuntu-latest | |
steps: | |
- name: repository checkout step | |
uses: actions/checkout@v4 | |
- name: python environment step | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- name: install pre-commit | |
run: python3 -m pip install pre-commit | |
- id: changed-files | |
name: identify modified files | |
uses: tj-actions/changed-files@v45 | |
- name: run pre-commit hooks on modified files | |
run: pre-commit run --color always --files ${{ steps.changed-files.outputs.all_changed_files }} --show-diff-on-failure | |
- name: check missing __init__ files | |
run: build_tools/fail_on_missing_init_files.sh | |
shell: bash | |
pytests-numba: | |
name: Run pytests with numba | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.9" | |
- name: Install Python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install .[dev,numba] | |
python -m pip install pytest | |
- name: Disable numba JIT | |
run: | | |
echo "NUMBA_DISABLE_JIT=1" >> $GITHUB_ENV | |
- name: Test with pytest | |
run: | | |
pytest --cov=skchange --cov-report=xml | |
pytests-no-numba: | |
name: Run pytests without numba | |
needs: pytests-numba | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.9" | |
- name: Install Python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install .[dev] | |
python -m pip install pytest | |
- name: Test with pytest | |
run: | | |
pytest --cov=skchange --cov-report=xml --cov-append | |
upload-code-cov: | |
name: Upload-coverage-reports-to-Codecov | |
needs: [pytests-numba, pytests-no-numba] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v3 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |