forked from lichess-bot-devs/lichess-bot
-
Notifications
You must be signed in to change notification settings - Fork 2
48 lines (43 loc) · 1.21 KB
/
python-test.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
# This workflow will install Python dependencies and run tests
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Python Test
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python: [3.9, "3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r test-requirements.txt
- name: Restore engines
id: cache-temp-restore
uses: actions/cache/restore@v3
with:
path: |
TEMP
key: ${{ matrix.os }}-engines
- name: Test with pytest
run: |
pytest --log-cli-level=10
- name: Save engines
id: cache-temp-save
uses: actions/cache/save@v3
with:
path: |
TEMP
key: ${{ steps.cache-temp-restore.outputs.cache-primary-key }}