-
Notifications
You must be signed in to change notification settings - Fork 11
108 lines (102 loc) · 3.17 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name: Tests
on:
push:
branches:
- master
pull_request:
jobs:
check-links:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check all links in *.md files
id: lychee
uses: lycheeverse/[email protected]
with:
args: >-
-v -n "*.md" "**/*.md"
--exclude "https://ingest.us0.signalfx.com.*"
--exclude "http://localhost*"
- name: Fail if there were link errors
run: exit ${{ steps.lychee.outputs.exit_code }}
test:
env:
py38: 3.8
py39: 3.9
py310: "3.10"
pypy3: pypy-3.8
RUN_MATRIX_COMBINATION: ${{ matrix.python-version }}-${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false # ensures the entire test matrix is run, even if one permutation fails
matrix:
python-version: [ py38, py39, py310, pypy3 ]
os: [ ubuntu-latest, windows-latest ]
steps:
- name: Checkout Repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4
- name: Set up Python ${{ env[matrix.python-version] }}
uses: actions/setup-python@v5
with:
python-version: ${{ env[matrix.python-version] }}
- name: Cache Python
uses: actions/cache@v4
with:
path: |
.tox
~/.cache/pip
~/.poetry/
key: test-cache-${{ env.RUN_MATRIX_COMBINATION }}-${{ hashFiles('poetry.lock') }}
- name: Fix cryptography version workaround
if: ${{ matrix.python-version == 'pypy3' && matrix.os == 'ubuntu-latest' }}
run: pip install "cryptography>=2.0,<=40.0.2"
- name: Install Tools
run: make install-tools
- name: Test
# pypy has some issues on github ci that we need to resolve before enabling it
if: ${{ matrix.python-version != 'pypy3' && matrix.os != 'windows' }}
run: tox -f ${{ matrix.python-version }}-test
integration:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4
- name: Set up Python ${{ env[matrix.python-version] }}
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Cache tox environment
uses: actions/cache@v4
with:
path: |
.tox
~/.cache/pip
~/.poetry/
key: integration-cache-${{ hashFiles('poetry.lock') }}
- name: Install Tools
run: make install-tools
- name: Integration
run: tox -e integration
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4
- name: Set up Python ${{ env[matrix.python-version] }}
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Cache tox environment
uses: actions/cache@v4
with:
path: |
.tox
~/.cache/pip
~/.poetry/
key: lint-cache-${{ hashFiles('poetry.lock') }}
- name: Install Tools
run: make install-tools
- name: Lint
run: tox -e lint