bump version #905
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
# This workflow will install Python dependencies, run tests, lint, and upload a report to codecov on selected branches | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: build | |
on: | |
push: | |
branches: '*' | |
pull_request: | |
branches: '*' | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v2 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install flake8 pytest pytest-cov pytest-repeat | |
cd src && pip install -r requirements.txt | |
- name: Flake8 Annotator | |
uses: rbialon/flake8-annotations@v1 | |
- name: Lint with flake8 | |
run: | | |
# stop the build if there are Python syntax errors or undefined names | |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
# exit-zero treats all errors as warnings. CTFOJ uses 90 characters per line as the limit for Python code. | |
flake8 . --count --exit-zero --ignore=F405,W503 --max-complexity=10 --max-line-length=90 --statistics | |
- name: Test and generate coverage report with pytest | |
run: | | |
git rm src/migrate.py | |
cd src && python -m pytest -v --cov=./ --cov-report=xml --count 2 | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v1 | |
with: | |
file: src/coverage.xml | |
flags: unittests | |
env_vars: OS, PYTHON |