-
Notifications
You must be signed in to change notification settings - Fork 4
187 lines (166 loc) · 4.41 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
name: CI
on:
push:
branches: [ main ]
tags:
- "*"
pull_request:
branches: [ main ]
schedule:
# Daily at 04:52
- cron: '52 4 * * *'
env:
A_SECRET: neverseethis
jobs:
ci:
name: ${{ matrix.os.emoji }} ${{ matrix.arch.name }} - ${{ matrix.python.name }}
runs-on: ${{ matrix.os.runs-on[matrix.arch.matrix] }}
strategy:
fail-fast: false
matrix:
os:
- name: Linux
emoji: 🐧
runs-on:
intel: ubuntu-latest
matrix: linux
- name: Windows
emoji: 🪟
runs-on:
intel: windows-latest
matrix: windows
- name: macOS
emoji: 🍎
runs-on:
arm: macos-latest
intel: macos-12
matrix: macos
arch:
- name: ARM
matrix: arm
- name: Intel
matrix: intel
python:
- name: CPython 3.7
action: '3.7'
- name: CPython 3.8
action: '3.8'
- name: CPython 3.9
action: '3.9'
- name: CPython 3.10
action: '3.10'
- name: PyPy 2.7
action: pypy-2.7
- name: PyPy 3.7
action: pypy-3.7
- name: PyPy 3.8
action: pypy-3.8
arch:
- name: ARM
matrix: arm
- name: Intel
matrix: intel
exclude:
- os:
matrix: linux
arch:
matrix: arm
- os:
matrix: windows
arch:
matrix: arm
- os:
matrix: macos
arch:
matrix: arm
python:
action: '3.7'
steps:
- uses: actions/checkout@v3
- name: Set up ${{ matrix.python.name }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python.action }}
- name: Run the action
uses: ./
env:
A_SECRET: '<masked>'
with:
output-path: output_pre.log
- uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os.name }} - ${{ matrix.python.name }}
path: output_pre.log
- name: Test - pre
shell: bash
run: |
python test.py --path output_pre.log
- name: Install attrs
shell: bash
run: |
python -m pip install attrs==20.3.0
- name: Run the action with attrs installed
uses: ./
env:
A_SECRET: '<masked>'
with:
output-path: output_post.log
- uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os.name }} - ${{ matrix.python.name }}
path: output_post.log
- name: Test - post
shell: bash
run: |
python test.py --path output_post.log --package attrs 20.3.0
- name: Create env and install requests
shell: bash
run: |
python -m pip install virtualenv
python -m virtualenv -p python an_env
an_env/*/python -m pip install six==1.15.0
- name: Run the action for the env
uses: ./
env:
A_SECRET: '<masked>'
with:
output-path: output_env.log
python-path: an_env/*/python
- uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os.name }} - ${{ matrix.python.name }}
path: output_env.log
- name: Test - env
shell: bash
run: |
python test.py --path output_env.log --package six 1.15.0 --sys-prefix "$(an_env/*/python -c 'import sys; sys.stdout.write(sys.prefix)')"
- name: Create tox env with build installed
shell: bash
run: |
python -m pip install tox
python -m tox -c tox_example.ini --notest -e with_build
- name: Run the action for the tox env
uses: ./
env:
A_SECRET: '<masked>'
with:
output-path: output_tox.log
python-path: .tox/with_build/*/python
- uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os.name }} - ${{ matrix.python.name }}
path: output_tox.log
- name: Test - tox
shell: bash
run: |
python test.py --path output_tox.log --package build 0.3.1 --sys-prefix "$(.tox/with_build/*/python -c 'import sys; sys.stdout.write(sys.prefix)')"
all:
name: All
runs-on: ubuntu-latest
needs:
- ci
steps:
- name: This
shell: python
run: |
import this