-
Notifications
You must be signed in to change notification settings - Fork 8
116 lines (116 loc) · 2.93 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
name: CI
on:
- push
- pull_request
jobs:
test:
name: Build and Test
if: always()
strategy:
fail-fast: false
matrix:
python:
- version: '3.8'
env: 'py38'
- version: '3.9'
env: 'py39'
- version: '3.10'
env: 'py310'
- version: '3.11'
env: 'py311'
- version: '3.12'
env: 'py312'
runs-on: ubuntu-latest
env:
PYTHON: ${{ matrix.python.version }}
steps:
- uses: actions/checkout@v3
- name: Setup python
uses: actions/setup-python@main
with:
python-version: ${{ matrix.python.version }}
- name: Start minikube
uses: medyagh/setup-minikube@master
- name: Deps
run: 'pip install tox'
- name: Tests
run: 'tox -e ${{ matrix.python.env }}'
env:
PYDATATASK_TEST_KUBE_CONTEXT: minikube
- name: Upload Coverage
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: false
env_vars: PYTHON
files: ./coverage.xml
flags: unittests
analyze:
name: Static Analysis
if: always()
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup python
uses: actions/setup-python@main
with:
python-version: '3.11'
- name: Deps
run: 'pip install -e .[dev]'
- name: Analyze
run: 'tox -m analyze-ci'
audit:
name: Pip Audit
if: always()
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup python
uses: actions/setup-python@main
with:
python-version: '3.11'
- name: Update Build Deps
run: pip install -U setuptools pip wheel
- name: install
run: pip install .
- uses: pypa/gh-action-pip-audit@v1.0.6
with:
ignore-vulns: |
GHSA-547x-748v-vp6p
docs:
name: Build Documentation
if: always()
runs-on: ubuntu-latest
steps:
- name: OS Deps
run: 'sudo apt-get install libfuse3-dev'
- uses: actions/checkout@v3
- name: Setup python
uses: actions/setup-python@main
with:
python-version: '3.11'
- name: Deps
run: 'pip install tox'
- name: Build Docs
run: 'tox -e doc'
release:
name: Release to PyPI
needs: ["test", "audit", "analyze", "docs"]
if: "github.event_name == 'push' && github.repository == 'rhelmot/pydatatask' && startsWith(github.ref, 'refs/tags/v') && success()"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup python
uses: actions/setup-python@main
with:
python-version: '3.11'
- name: Deps
run: 'pip install -U build wheel semver'
- name: Fix Version
run: './release.py finalize'
- name: Build
run: 'python -m build'
- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}