forked from TISUnion/PrimeBackup
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (46 loc) · 1.44 KB
/
test.yml
File metadata and controls
55 lines (46 loc) · 1.44 KB
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
name: Tests
on:
push:
paths:
- '.github/workflows/test.yml'
- 'prime_backup/**'
- 'tests/**'
jobs:
unit_test:
runs-on: ubuntu-latest
name: unit tests
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'
cache-dependency-path: '**/requirements*.txt'
- name: Install dependencies
run: |
python -m pip install -U pip
pip install pytest pytest-cov -r requirements.txt -r requirements.optional.txt
- name: Run common unit tests
run: pytest tests/ --ignore=tests/test_fuzzy_run.py
fuzzy_test:
runs-on: ubuntu-latest
strategy:
matrix:
seed: ['0', '1', '2', '3', '4', '5', '6', '7']
name: fuzzy test with random seed ${{ matrix.seed }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'
cache-dependency-path: '**/requirements*.txt'
- name: Install dependencies
run: |
python -m pip install -U pip
pip install pytest pytest-cov -r requirements.txt -r requirements.optional.txt
- name: Run fuzzy test
run: pytest tests/test_fuzzy_run.py
env:
PRIME_BACKUP_FUZZY_TEST_SEED: ${{ matrix.seed }}
PRIME_BACKUP_FUZZY_TEST_ITERATION: ${{ matrix.seed == '0' && '5000' || '500' }}