-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (55 loc) · 1.92 KB
/
build.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
name: build
on:
push:
release:
types: [created, published]
env:
python_version: '3.12'
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-22.04
container: fedora:41
timeout-minutes: 30
permissions:
contents: write
steps:
- name: Harden Runner
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
with:
egress-policy: audit
- name: Install Linux Dependencies
run: >
dnf install -y gcc git graphviz pkg-config python-launcher upx
mutter dbus-x11 gtk4 gobject-introspection-devel
cairo-gobject-devel gtksourceview5-devel libadwaita-devel cairo-devel
python${{ env.python_version }}-devel
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set ownership of checkout directory
run: chown -R $(id -u):$(id -g) $PWD
- name: Use Python Dependency Cache
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
path: ~/.cache/pip
key: python${{ env.python_version }}-${{ hashFiles('**/poetry.lock') }}-41
- name: Install Poetry
run: |
python${{ env.python_version }} -m ensurepip
python${{ env.python_version }} -m pip install --constraint=.github/constraints.txt poetry
- name: Configure Poetry
run: poetry config virtualenvs.in-project true
- name: Install Python Dependencies
run: |
poetry lock --no-update
poetry install --no-interaction
- name: Install settings schemas
run: poetry run gaphor install-schemas
- name: Run Tests
env:
XDG_RUNTIME_DIR: /tmp
run: |
eval $(dbus-launch --auto-syntax)
mutter --wayland --no-x11 --sm-disable --headless -- poetry run pytest