-
Notifications
You must be signed in to change notification settings - Fork 112
50 lines (40 loc) · 1.2 KB
/
run-tests.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
name: CI
# see https://github.community/t5/GitHub-Actions/How-to-trigger-an-action-on-push-or-pull-request-but-not-both/m-p/35805
on:
push:
branches:
- master
pull_request:
branches:
- master
schedule:
# Run workflow every morning (* needs quotes).
- cron: '0 4 * * *'
jobs:
run-tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, ubuntu-24.04]
steps:
- uses: actions/checkout@v4
- name: Show environment
run: |
python --version
python3 --version
python3 -c "import multiprocessing as m; print('CPUs:', m.cpu_count())"
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get -y install -qq gettext gir1.2-gdkpixbuf-2.0 gir1.2-glib-2.0 gir1.2-gtk-3.0 gir1.2-gtksource-4 gir1.2-pango-1.0 gir1.2-webkit2-4.1 python3 python3-enchant python3-gi python3-setuptools python3-yaml tox
- name: Check style
if: matrix.os == 'ubuntu-24.04'
run: |
tox -v -e style
- name: Run tests
if: matrix.os == 'ubuntu-24.04'
run: |
python3 -c "import gi"
tox -v -e py
python3 -m venv .venv
./.venv/bin/pip install .