Release: 0.0.2 #11
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: Build | |
on: | |
push: | |
pull_request: | |
types: [ opened, reopened, ready_for_review, synchronize ] | |
jobs: | |
codestyle-unit-tests: | |
runs-on: ubuntu-20.04 | |
container: | |
image: python:3.8.10-slim | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install make | |
run: | | |
apt-get update | |
apt-get install -y make | |
- name: Load cached virtual environment | |
uses: actions/cache@v2 | |
id: cache | |
with: | |
path: ~/venv/ | |
key: v0.1.0-build-${{ hashFiles('setup.py') }} | |
- name: Create virtual environment on cache miss | |
if: steps.cache.outputs.cache-hit != 'true' | |
run: | | |
python -m venv ~/venv && . ~/venv/bin/activate | |
pip install --upgrade pip!=21.3 | |
pip install -e .[dev] | |
- name: Run black check | |
run: | | |
. ~/venv/bin/activate | |
make check-black | |
- name: Run ruff check | |
run: | | |
. ~/venv/bin/activate | |
make check-ruff | |
- name: Run mypy check | |
run: | | |
. ~/venv/bin/activate | |
make mypy | |
- name: Run unit tests | |
run: | | |
. ~/venv/bin/activate | |
make ci-unit-tests | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ./coverage-unit.xml | |
flags: unit | |
fail_ci_if_error: true | |
verbose: true |