Improve readers module #6
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: | |
- main | |
- dev | |
pull_request: ~ | |
schedule: | |
- cron: '0 0 * * *' | |
env: | |
DEFAULT_PYTHON: 3.11 | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Set up Python ${{ env.DEFAULT_PYTHON }} | |
uses: actions/[email protected] | |
with: | |
python-version: ${{ env.DEFAULT_PYTHON }} | |
- name: Get pip cache directory path | |
id: pip-cache | |
run: echo "PIP_CACHE_DIR=$(pip cache dir)" >> $GITHUB_ENV | |
- name: Cache pip dependencies | |
uses: actions/[email protected] | |
with: | |
path: ${{ env.PIP_CACHE_DIR }} | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Install project dependencies | |
run: | | |
pip install . | |
- name: Install test dependencies | |
run: | | |
pip install -r requirements_test.txt | |
- name: Run tests | |
run: | | |
pytest --cov=asusrouter --cov-report term-missing | |
- name: Upload coverage to Codecov | |
uses: codecov/[email protected] | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: true |