[pre-commit.ci] pre-commit autoupdate #1551
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: sheetwork build, test, cov report | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout branch | |
uses: actions/checkout@v2 | |
- name: Deploy PG docker | |
run: docker-compose -f ./tests/docker_postgres/docker-compose.yml up -d | |
- name: Check for Container | |
run: docker ps | |
- name: Set up Python 3.7 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.7 | |
- name: Install Poetry | |
uses: Gr1N/setup-poetry@v4 | |
- name: Cache Poetry virtualenv | |
uses: actions/cache@v1 | |
id: cache | |
with: | |
path: ~/.virtualenvs | |
key: poetry-$ | |
restore-keys: | | |
poetry-$ | |
- name: Install Dependencies using Poetry | |
run: poetry install | |
if: steps.cache.outputs.cache-hit != 'true' | |
- name: Run Tests and Coverage Report | |
run: | | |
PYTHONPATH=src/ poetry run python -m pytest --cov-report=xml:coverage-reports/coverage.xml --cov-report term-missing --cov=sheetwork tests/ | |
- name: Upload coverage report to CodeCov | |
uses: codecov/codecov-action@v1 | |
with: | |
env_vars: GITHUB_RUN_ID | |
file: coverage-reports/coverage.xml | |
flags: unittests | |
name: codecov-umbrella | |
fail_ci_if_error: false |