-
-
Notifications
You must be signed in to change notification settings - Fork 7
61 lines (58 loc) · 1.55 KB
/
pytest.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Pytest
on:
push:
paths:
- ytmusic_deleter/**
- tests/**
- '**/pytest.yml'
- pyproject.toml
- pdm.lock
pull_request:
paths:
- ytmusic_deleter/**
- tests/**
- '**/pytest.yml'
- pyproject.toml
- pdm.lock
workflow_dispatch:
schedule:
- cron: '0 10 * * *'
concurrency:
group: pytest
jobs:
pytest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Setup PDM
uses: pdm-project/setup-pdm@v4
- name: Install dependencies
run: pdm install -dG test
- name: Create test resources
env:
HEADERS_AUTH: ${{ secrets.BROWSER_JSON }}
OAUTH_JSON: ${{ secrets.OAUTH_JSON }}
TEST_CFG: ${{ secrets.TEST_CFG }}
run: |
wget -O 'tests/resources/Jennifer Lost the War.mp3' https://drive.google.com/uc?id=18AP7mQqQxqj2_delNyhoCNa6UCUCN9-P
cat <<< "$HEADERS_AUTH" > tests/resources/browser.json
cat <<< "$OAUTH_JSON" > tests/resources/oauth.json
cat <<< "$TEST_CFG" > tests/resources/test.cfg
- name: Run pytest
uses: nick-fields/retry@v3
with:
command: pdm run pytest
max_attempts: 2
timeout_minutes: 20
- name: Generate coverage report
run: |
pdm run coverage xml
- name: Upload coverage to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: apastel/ytmusic-deleter