chnge CVI config #2
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 ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.8, 3.9, "3.10"] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
pip install -r requirements-dev.txt | |
- name: Run tests | |
run: | | |
pytest --cov=src tests/ | |
- name: Check code formatting | |
run: | | |
black --check src tests | |
isort --check-only src tests | |
- name: Lint | |
run: | | |
flake8 src tests | |
mypy src | |
build: | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.10" | |
- name: Install build dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install build wheel | |
- name: Build package | |
run: | | |
python -m build | |
- name: Upload artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: dist | |
path: dist/ |