-
Notifications
You must be signed in to change notification settings - Fork 55
69 lines (55 loc) · 1.65 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
61
62
63
64
65
66
67
68
69
name: CI
on:
# Manually triggerable in github
workflow_dispatch:
push:
paths-ignore:
- "docs/**"
- "*.md"
- ".github/workflows/mirror.yml"
- ".gitlab/.gitlab-ci.yml"
pull_request:
paths-ignore:
- "docs/**"
- "*.md"
- ".github/workflows/mirror.yml"
- ".gitlab/.gitlab-ci.yml"
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.9"
- name: pre-commit
uses: pre-commit/[email protected]
linux-py39-tests:
needs: pre-commit
runs-on: ubuntu-latest
if: |
( github.event_name == 'push' ) && ( needs.pre-commit.result == 'success' )
||
( github.event_name == 'pull_request' ) && ( needs.pre-commit.result == 'success' )
||
( github.event_name == 'workflow_dispatch' ) && ( needs.pre-commit.result == 'success' )
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
- uses: Gr1N/setup-poetry@v8
with:
poetry-version: 1.1.7
# - name: update pip if python 3.12
# run: pip install setuptools && python -m ensurepip --upgrade
- name: install deps for Ubuntu
run: sudo apt-get install build-essential libcairo2 libpango-1.0-0 libpangocairo-1.0-0 libgdk-pixbuf2.0-0 libffi-dev shared-mime-info
- name: install tox
run: |
python3 -m pip install --upgrade pip
pip3 install tox==3.28.0
pip3 install tox-gh-actions==2.12.0
- name: test with tox
run: |
tox