Skip to content

Commit 63c45b8

Browse files
committed
Added release job and codecov.
Signed-off-by: Pavel Kirilin <win10@list.ru>
1 parent 531b701 commit 63c45b8

2 files changed

Lines changed: 36 additions & 2 deletions

File tree

.github/workflows/release.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Release python package
2+
3+
on:
4+
push:
5+
tags:
6+
- "*"
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: Set up Python
14+
uses: actions/setup-python@v2
15+
with:
16+
python-version: "3.9"
17+
- name: Install deps
18+
uses: knowsuchagency/poetry-install@v1
19+
env:
20+
POETRY_VIRTUALENVS_CREATE: false
21+
- name: Release package
22+
env:
23+
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
24+
run: poetry publish --build

.github/workflows/test.yaml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,23 @@ jobs:
6464
run: poetry install
6565
env:
6666
POETRY_VIRTUALENVS_CREATE: false
67-
- uses: KengoTODA/actions-setup-docker-compose@v1
67+
- name: Update docker-compose
68+
uses: KengoTODA/actions-setup-docker-compose@v1
6869
with:
69-
version: '2.16.0'
70+
version: "2.16.0"
7071
- name: docker compose up
7172
run: docker-compose up -d --wait
7273
- name: Run pytest check
7374
run: poetry run pytest -vv -n auto --cov="taskiq_nats" .
75+
- name: Generate report
76+
run: poetry run coverage xml
77+
- name: Upload coverage reports to Codecov with GitHub Action
78+
uses: codecov/codecov-action@v3
79+
if: matrix.py_version == '3.9'
80+
with:
81+
token: ${{ secrets.CODECOV_TOKEN }}
82+
fail_ci_if_error: true
83+
verbose: true
7484
- name: Stop containers
7585
if: always()
7686
run: docker-compose down

0 commit comments

Comments
 (0)