-
Notifications
You must be signed in to change notification settings - Fork 69
54 lines (45 loc) · 1.18 KB
/
CI.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
name: CI
on:
schedule:
- cron: "42 6 * * *"
push:
branches: [develop]
paths:
- "aiotieba/**"
- "thirdparty/**"
- "tests/**"
- ".github/workflows/CI*"
pull_request:
branches: [develop]
paths:
- "aiotieba/**"
- "thirdparty/**"
- "tests/**"
- ".github/workflows/CI*"
jobs:
test:
name: Test
runs-on: ubuntu-latest
environment: develop
strategy:
matrix:
python-version: ["3.8", "3.11"]
steps:
- name: Checkout develop
uses: actions/checkout@v3
with:
ref: develop
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: "tests/requirements.txt"
- name: Install dependencies
run: |
python -m pip install -U pip -qq
pip install -r tests/requirements.txt -qq
- name: Prepare config
run: gpg --quiet --batch --yes --decrypt --passphrase=${{ secrets.PASSPHRASE }} --output aiotieba.toml tests/aiotieba.toml.gpg
- name: Run tests
run: pytest tests