This repository has been archived by the owner on Feb 27, 2024. It is now read-only.
Update README.md #102
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: test | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.6, 3.7, 3.8, 3.9] | |
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 poetry | |
run: | | |
curl -sSL \ | |
"https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py" | python | |
# Adding `poetry` to `$PATH`: | |
echo "$HOME/.poetry/bin" >> $GITHUB_PATH | |
- name: Set up cache | |
uses: actions/cache@v2 | |
with: | |
path: .venv | |
key: venv-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }} | |
- name: Install dependencies | |
run: | | |
poetry config virtualenvs.in-project true | |
poetry install | |
poetry run pip install -U pip | |
- name: Run checks | |
run: | | |
poetry run flake8 . | |
poetry run mypy mimesis_factory.py | |
poetry run pytest | |
poetry check | |
poetry run pip check | |
poetry run safety check --bare --full-report | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v1 | |
with: | |
file: ./coverage.xml |