-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (64 loc) · 1.71 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
55
56
57
58
59
60
61
62
63
64
65
66
67
---
name: Tests
on:
pull_request:
branches:
- main
- dev
- working
- "feature/*"
paths-ignore:
- "docs/**"
- "news/**"
- "*.md"
- Dockerfile
push:
branches:
- main
- dev
- working
- "feature/*"
paths-ignore:
- "docs/**"
- "news/**"
- "*.md"
- Dockerfile
workflow_dispatch:
concurrency:
group: ${{ github.event.number || github.run_id }}
cancel-in-progress: true
jobs:
Testing:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
os:
- ubuntu-latest
# - windows-latest
# - macos-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: pdm-project/setup-pdm@v4
with:
python-version: ${{ matrix.python-version }}
- name: Set Variables
id: set_variables
shell: bash
run: |
echo "PY=$(python -c 'import hashlib, sys;print(hashlib.sha256(sys.version.encode()+sys.executable.encode()).hexdigest())')" >> $GITHUB_OUTPUT
- name: Cache venv
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ matrix.arch }}-${{ matrix.python-version }}-${{ hashFiles('pdm.lock') }}
restore-keys: |
venv-${{ runner.os }}-${{ matrix.arch }}-${{ matrix.python-version }}-
- name: Install Dev Dependencies
run: |
pdm install --verbose --dev --group :all --without nltk
pdm info
- name: Run Tests
run: pdm run pytest --cov=sonatoki --cov-config=pyproject.toml tests