Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace codecov workflow #63

Merged
merged 2 commits into from
Aug 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 6 additions & 29 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,17 @@
name: coverage

on:
pull_request:
push:
branches:
- master

jobs:
codecov:
# ---------------------------------------------------
# Documentation and examples can be found at
# https://github.com/snok/install-poetry
# ---------------------------------------------------
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install poetry
uses: snok/[email protected]
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v2
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
run: poetry install
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
- name: Test with pytest
run: poetry run pytest --cov=django_guid tests/ --verbose --assert=plain --cov-report=xml
- name: Upload coverage
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml
fail_ci_if_error: true
- uses: snok/.github/workflows/codecov@main
with:
source-dir: django_guid
pip-cache-key: pip-0
poetry-cache-key: poetry-0
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [ "3.7", "3.8", "3.9", "3.10.0-beta.1" ]
python-version: [ "3.7", "3.8", "3.9", "3.10.0-rc.1" ]
django-version: [ "3.1.1", "3.1.2", "3.1.3", "3.1.4", "3.2" ]
steps:
- name: Check out repository
Expand All @@ -49,16 +49,16 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
uses: snok/install-poetry@v1.1.6
uses: snok/install-poetry@v1
with:
version: 1.2.0a1
version: 1.2.0a2
virtualenvs-in-project: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v2
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}-5
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}-6
- name: Install dependencies
run: poetry install
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
Expand Down