-
Notifications
You must be signed in to change notification settings - Fork 2
114 lines (93 loc) · 2.62 KB
/
Copy pathbuild.yml
File metadata and controls
114 lines (93 loc) · 2.62 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
name: LEEP
on: [push, pull_request, workflow_dispatch]
jobs:
test:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- name: Ubuntu latest with py3.x
os: ubuntu-latest
python: "3.x"
steps:
- uses: actions/checkout@v6
- name: Setup python
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python }}
- name: Install basic Python packages
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install pytest flake8
which python
python --version
python -m pip --version
python -m pytest --version
python -m flake8 --version
- name: Lint
run: |
flake8
continue-on-error: true
- name: Test
run: |
python -m pytest -v
release:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
needs: test
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
strategy:
fail-fast: false
matrix:
include:
- name: Ubuntu latest with py3.x
os: ubuntu-latest
python: "3.x"
steps:
- uses: actions/checkout@v6
- name: Setup python
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python }}
- name: Install basic Python packages
run: |
python -m pip install --upgrade pip
python -m pip install \
"setuptools>=64" \
"setuptools-scm>=8" \
build \
wheel \
twine
which python
python --version
python -m pip --version
python -m build --version
python -m wheel version
python -m twine --version
- name: Build
run: |
python3 -m build -v
- name: List artifacts
run: |
ls dist/*
- name: Save artifacts
uses: actions/upload-artifact@v4
with:
name: "leep ${{ matrix.name }}"
path: dist/*
- name: Check wheels
run: |
python -m twine check dist/leep*.whl
- name: Check source
run: |
python -m twine check dist/leep*.tar.*
- name: Upload package
env:
PYPI_REPOSITORY: pypi
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python -m twine upload --repository ${{ env.PYPI_REPOSITORY }} dist/*