Merge pull request #714 from VWS-Python/dependabot/pip/ruff-0.0.286 #2523
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: CI | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
schedule: | |
# * is a special character in YAML so you have to quote this string | |
# Run at 1:00 every day | |
- cron: '0 1 * * *' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.11"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: "Set up Python" | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: "Install dependencies" | |
run: | | |
python -m pip install --upgrade pip setuptools wheel | |
# We use '--ignore-installed' to avoid GitHub's cache which can cause | |
# issues - we have seen packages from this cache be cause trouble with | |
# pip-extra-reqs. | |
python -m pip install --ignore-installed --upgrade --editable .[dev] | |
- name: "Lint" | |
run: | | |
make lint | |
- name: "Run tests" | |
env: | |
# See https://pytest-cov.readthedocs.io/en/latest/plugins.html for why we | |
# set these variables, and use `--cov-append`. | |
# | |
# Without them, pytest plugin coverage is not counted correctly. | |
COV_CORE_CONFIG: .coveragerc | |
COV_CORE_SOURCE: src | |
COV_CORE_DATAFILE: .coverage.eager | |
run: | | |
# We run tests against "." and not the tests directory as we test the README | |
# and documentation. | |
pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests . --cov-report=xml | |
- name: "Upload coverage to Codecov" | |
uses: "codecov/codecov-action@v3" |