Skip to content

Commit 4defa2c

Browse files
committed
update test.yml
1 parent 9910207 commit 4defa2c

1 file changed

Lines changed: 15 additions & 18 deletions

File tree

.github/workflows/test.yml

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,28 @@
1-
name: Tests
1+
name: Run tests and upload coverage
22

3-
on:
4-
push:
5-
branches: [main]
6-
pull_request:
7-
branches: [main]
3+
on:
4+
push
85

96
jobs:
107
test:
8+
name: Run tests and collect coverage
119
runs-on: ubuntu-latest
12-
1310
steps:
14-
- uses: actions/checkout@v4
11+
- name: Checkout
12+
uses: actions/checkout@v4
13+
with:
14+
fetch-depth: 2
1515

1616
- name: Set up Python
1717
uses: actions/setup-python@v4
18-
with:
19-
python-version: '3.11'
2018

2119
- name: Install dependencies
22-
run: |
23-
pip install -r requirements.txt
24-
pip install pytest pytest-cov
20+
run: poetry add pytest pytest-cov
2521

26-
- name: Run tests with coverage
27-
run: |
28-
pytest --cov=ytfetcher --cov-report=xml
22+
- name: Run tests
23+
run: poetry run pytest --cov --cov-branch --cov-report=xml
2924

30-
- name: Upload coverage to Codecov
31-
uses: codecov/codecov-action@v4
25+
- name: Upload results to Codecov
26+
uses: codecov/codecov-action@v4
27+
with:
28+
slug: kaya70875/ytfetcher

0 commit comments

Comments
 (0)