-
Notifications
You must be signed in to change notification settings - Fork 21
87 lines (87 loc) · 2.48 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: CI
permissions:
contents: read
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
on:
push:
branches:
- main
- "renovate/**"
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- uses: actions/cache@v3
id: pip-cache
with:
path: .venv
key: draftjs_exporter-v3-${{ runner.os }}-py312-${{ hashFiles('**/requirements.txt') }}
- if: steps.pip-cache.outputs.cache-hit != 'true'
run: |
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
- run: |
source .venv/bin/activate
make lint
- run: |
source .venv/bin/activate
make benchmark
- run: |
source .venv/bin/activate
make build
- uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
- run: npm ci
- run: npm run lint
- run: |
source .venv/bin/activate
make test-coverage
test_compat:
needs: test
runs-on: ubuntu-latest
strategy:
matrix:
include:
- python: "3.8"
toxenv: py38-lower_bound_deps
- python: "3.9"
toxenv: py39-lower_bound_deps
- python: "3.10"
toxenv: py310-upper_bound_deps
- python: "3.11"
toxenv: py311-upper_bound_deps
- python: "3.12"
toxenv: py312-upper_bound_deps
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- run: pip install tox==3.24.5
- run: sudo apt-get install libxml2-dev libxslt-dev
- run: tox --parallel
env:
TOXENV: ${{ matrix.toxenv }}
# test_experimental:
# # Ad-hoc job to test experimental support without having to adjust all of our project for compatibility.
# needs: test
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-python@v5
# with:
# # See available versions:
# # https://github.com/actions/python-versions/blob/main/versions-manifest.json
# python-version: "3.13.0-alpha.2"
# - run: pip install build==0.8.0 beautifulsoup4>=4.4.1,<5 html5lib>=0.999,<2
# - run: python -X dev -W error example.py
# - run: make build