-
Notifications
You must be signed in to change notification settings - Fork 8
46 lines (46 loc) · 1.13 KB
/
main.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
on: [push]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- run: pip install ruff
- name: linters
run: |
ruff check mfa tests
test:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- python: '3.9'
django: '3.2'
- python: '3.12'
django: '4.2'
- python: '3.12'
django: '5.1'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- run: pip install . coverage tomli "django==${{ matrix.django }}"
- name: tests
run: |
coverage run -m django test --settings tests.settings
coverage report
publish:
needs: [lint, test]
if: startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- run: pip install build
- name: build
run: python3 -m build
- name: publish
uses: pypa/gh-action-pypi-publish@release/v1