-
Notifications
You must be signed in to change notification settings - Fork 6
144 lines (137 loc) · 4.19 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
name: "CI"
on:
push:
branches:
- main
pull_request:
release:
types:
- published
schedule:
- cron: '0 12 * * 6'
jobs:
flake8:
name: flake8
runs-on: 'ubuntu-latest'
defaults:
run:
shell: bash -el {0}
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: flake8
auto-update-conda: true
miniforge-variant: Mambaforge
- name: Install dependencies
run: mamba install --yes --quiet flake8
- name: Execute flake8
run: flake8 . --max-line-length=99
pycharm-security:
runs-on: ubuntu-latest
name: pycharm-security
steps:
- uses: actions/checkout@v2
- name: Run PyCharm Security
uses: tonybaloney/pycharm-security@master
pytest:
needs: [flake8, pycharm-security]
name: pytest (Python ${{ matrix.python-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -el {0}
strategy:
fail-fast: false
matrix:
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
python-version: ['3.8', '3.9', '3.10', '3.11']
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: test
auto-update-conda: true
miniforge-variant: Mambaforge
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: mamba install --yes --quiet --file requirements.txt --file requirements_test.txt "python=${{ matrix.python-version }}.*=*_cpython" "pandoc=2"
- name: Execute pytest
run: pytest .
- uses: codecov/codecov-action@v1
pytest-pandoc-versions:
needs: [flake8, pycharm-security]
name: pytest (Pandoc ${{ matrix.pandoc-version }})
runs-on: 'ubuntu-latest'
defaults:
run:
shell: bash -el {0}
strategy:
fail-fast: false
matrix:
pandoc-version: ['2.11', '2.12', '2.13', '2.14', '2.15', '2.16', '2.17', '2.18', '2.19']
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: test
auto-update-conda: true
miniforge-variant: Mambaforge
- name: Install dependencies
run: mamba install --yes --quiet --file requirements.txt --file requirements_test.txt pandoc=${{ matrix.pandoc-version }}
- name: Execute pytest
run: pytest .
conda-build:
needs: [pytest, pytest-pandoc-versions]
name: conda-build (${{ matrix.os }})
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -el {0}
strategy:
fail-fast: false
matrix:
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Fetch history for all branches and tags
run: git fetch --prune
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
miniforge-variant: Mambaforge
- name: Install conda-build
run: mamba install --yes --quiet conda-build boa
- name: Execute conda-build
run: conda mambabuild --output-folder conda-bld conda.recipe
- uses: actions/upload-artifact@v2
with:
name: python-${{ matrix.os }}
path: conda-bld/*/*.tar.bz2
pypi-packages:
needs: [pytest, pytest-pandoc-versions]
name: pypi-packages
runs-on: 'ubuntu-latest'
defaults:
run:
shell: bash -el {0}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Fetch history for all branches and tags
run: git fetch --prune
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
miniforge-variant: Mambaforge
- name: Install setuptools setuptools-scm and wheel
run: mamba install --yes --quiet build setuptools setuptools-scm wheel
- name: Build source-distribution and wheel
run: python -m build
- uses: actions/upload-artifact@v2
with:
name: pypi-packages
path: dist/*