-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (49 loc) · 1.68 KB
/
main.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
name: CI
# We can specify which Github events will trigger a CI build
on: push
# now define a single job 'build' (but could define more)
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
python-version: [ 3.7, 3.8, 3.9, '3.10', 3.11, 3.12 ]
exclude: # Apple Silicon ARM64 does not support Python < v3.8
- python-version: "3.6"
os: macos-latest
- python-version: "3.7"
os: macos-latest
include: # So run those legacy versions on Intel CPUs
- python-version: "3.6"
os: macos-13
- python-version: "3.7"
os: macos-13
fail-fast: false
# a job is a seq of steps
steps:
# Next we need to checkout out repository, and set up Python
# A 'name' is just an optional label shown in the log - helpful to clarify progress - and can be anything
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Python dependencies
run: |
python3 -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest
pip3 install -e .
- name: Install xvfb (for Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y xvfb
- name: Run tests (for Linux)
if: runner.os == 'Linux'
run: xvfb-run pytest
- name: Run tests (for macOS and Windows)
if: runner.os != 'Linux'
run: pytest