Skip to content

Commit

Permalink
ci: add codecov (#199)
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinBernstorff authored Nov 18, 2023
1 parent 5133c0d commit 4d546d4
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: codecov
on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
codecov:
concurrency:
group: "${{ github.workflow }} @ ${{ github.ref }}"
cancel-in-progress: true
runs-on: ubuntu-latest
steps:
- name: Checkout (GitHub)
uses: actions/checkout@v3

- name: Configure Python version
uses: actions/setup-python@v4
with:
python-version: "3.11"
architecture: x64

- name: Install
run: make install-test

- name: Run tests and collect coverage
run: make test-cov

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

Binary file added codecov
Binary file not shown.
6 changes: 6 additions & 0 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ SRC_PATH = personal_mnemonic_medium
deploy:
./docker_cmd.sh

install-test:
pip install --upgrade .[dev,tests]

install-dev:
pip install --upgrade .[dev]

Expand All @@ -13,6 +16,9 @@ install:
test: ## Run tests
pytest personal_mnemonic_medium/tests

test-cov: ## Run tests with coverage
pytest --cov=personal_mnemonic_medium --cov-report=term-missing personal_mnemonic_medium/tests

lint: ## Format code
ruff format .
ruff . --fix \
Expand Down

0 comments on commit 4d546d4

Please sign in to comment.