-
Notifications
You must be signed in to change notification settings - Fork 246
60 lines (51 loc) · 1.7 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
name: CI
on:
push:
pull_request:
# Run CI once a week even without code changes to ensure tests pass with updated dependencies.
schedule:
- cron: '0 0 * * 5'
# Allow triggering a CI run from the web UI.
workflow_dispatch:
jobs:
build-and-test:
strategy:
fail-fast: false
matrix:
os:
- { icon: 🐧, name: ubuntu-20.04 }
- { icon: 🍎, name: macos-latest }
# CI is currently broken on Windows
# https://github.com/olofk/fusesoc/issues/528
#- { icon: 🧊, name: windows-latest }
pyver:
- '3.7'
- '3.8'
- '3.9'
- '3.10'
- '3.11'
- '3.12'
exclude:
#Fails because github can't find an arm64 image for Python 3.7???
- os: {name: macos-latest}
pyver: '3.7'
#Fails because one test expects a different output during an exception
- os: {name: macos-latest}
pyver: '3.8'
runs-on: ${{ matrix.os.name }}
name: ${{ matrix.os.icon }} ${{ matrix.os.name }} | ${{ matrix.pyver }}
steps:
- name: 🧰 Repository Checkout
uses: actions/checkout@v4
- name: 🐍 Set up Python ${{ matrix.pyver }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.pyver }}
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: 🛠️ Install Tox and any other packages
run: pip install tox tox-gh-actions
- name: 🚧 Build package and run tests with tox
# XXX: Remove `-e py3-ci` and rely on the settings in tox.ini as soon as
# https://github.com/ymyzk/tox-gh-actions/issues/44 is resolved.
run: tox -e py3-ci