forked from domdfcoding/domdf_python_tools
-
Notifications
You must be signed in to change notification settings - Fork 0
168 lines (136 loc) Β· 4.88 KB
/
Copy pathpython_ci_linux.yml
File metadata and controls
168 lines (136 loc) Β· 4.88 KB
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
# This file is managed by 'repo_helper'. Don't edit it directly.
---
name: Linux
on:
push:
pull_request:
branches: ["master"]
jobs:
tests:
name: "ubuntu-20.04 / Python ${{ matrix.config.python-version }}"
runs-on: "ubuntu-20.04"
continue-on-error: ${{ matrix.config.experimental }}
env:
USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10.0-alpha.4,pypy-3.6'
strategy:
fail-fast: False
matrix:
config:
- {python-version: "3.6", testenvs: "py36,build", experimental: False}
- {python-version: "3.7", testenvs: "py37,build", experimental: False}
- {python-version: "3.8", testenvs: "py38,build", experimental: False}
- {python-version: "3.9", testenvs: "py39,build", experimental: False}
- {python-version: "3.10.0-alpha.4", testenvs: "py310-dev,build", experimental: True}
- {python-version: "pypy-3.6", testenvs: "pypy3,build", experimental: False}
steps:
- name: Checkout ποΈ
uses: "actions/checkout@v2"
- name: Setup Python π
uses: "actions/setup-python@v2"
with:
python-version: "${{ matrix.config.python-version }}"
- name: Install dependencies π§
run: |
python -VV
python -m site
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade tox virtualenv
python -m pip install --upgrade coverage_pyver_pragma
- name: "Run Tests for Python ${{ matrix.config.python-version }}"
run: python -m tox -e "${{ matrix.config.testenvs }}"
- name: "Upload Coverage π"
uses: actions/upload-artifact@v2
if: ${{ always() }}
with:
name: "coverage-${{ matrix.config.python-version }}"
path: .coverage
Coverage:
needs: tests
runs-on: "ubuntu-20.04"
steps:
- name: Checkout ποΈ
uses: "actions/checkout@v2"
- name: Setup Python π
uses: "actions/setup-python@v2"
with:
python-version: 3.8
- name: Install dependencies π§
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade "coveralls>=3.0.0" coverage_pyver_pragma
- name: "Download Coverage πͺ"
uses: actions/download-artifact@v2
with:
path: coverage
- name: Display structure of downloaded files
run: ls -R
working-directory: coverage
- name: Combine Coverage π·
run: |
shopt -s globstar
python -m coverage combine coverage/**/.coverage
- name: "Upload Combined Coverage Artefact π"
uses: actions/upload-artifact@v2
with:
name: "combined-coverage"
path: .coverage
- name: "Upload Combined Coverage to Coveralls"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
coveralls --service=github
Deploy:
needs: tests
runs-on: "ubuntu-20.04"
steps:
- name: Checkout ποΈ
uses: "actions/checkout@v2"
if: startsWith(github.ref, 'refs/tags/')
- name: Setup Python π
uses: "actions/setup-python@v2"
with:
python-version: 3.8
if: startsWith(github.ref, 'refs/tags/')
- name: Install dependencies π§
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade tox
if: startsWith(github.ref, 'refs/tags/')
- name: Build distributions π¦
run: |
tox -e build
if: startsWith(github.ref, 'refs/tags/')
- name: Upload distribution to PyPI π
if: startsWith(github.ref, 'refs/tags/')
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
skip_existing: true
Conda:
needs: deploy
runs-on: "ubuntu-20.04"
if: startsWith(github.ref, 'refs/tags/') || (startsWith(github.event.head_commit.message, 'Bump version') != true)
steps:
- name: Checkout ποΈ
uses: "actions/checkout@v2"
- name: Setup Python π
uses: "actions/setup-python@v2"
with:
python-version: 3.8
- name: Install dependencies π§
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade repo_helper
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
bash miniconda.sh -b -p $HOME/miniconda
- name: Build Conda π¦
run: |
chmod +x .github/actions_build_conda.sh
bash .github/actions_build_conda.sh
- name: Deploy Conda π
run: |
chmod +x .github/actions_deploy_conda.sh
bash .github/actions_deploy_conda.sh
env:
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}