File tree Expand file tree Collapse file tree 3 files changed +258
-188
lines changed Expand file tree Collapse file tree 3 files changed +258
-188
lines changed Original file line number Diff line number Diff line change
1
+ name : main
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+ pull_request :
8
+ types : [synchronize]
9
+
10
+ concurrency :
11
+ group : ${{ github.head_ref || github.run_id }}
12
+ cancel-in-progress : true
13
+
14
+ jobs :
15
+ lint :
16
+ runs-on : ubuntu-latest
17
+ steps :
18
+ - uses : actions/checkout@v3
19
+ - uses : actions/setup-python@v4
20
+ with :
21
+ python-version : " 3.10"
22
+ - uses : arduino/setup-task@v1
23
+ with :
24
+ repo-token : ${{ github.token }}
25
+ - run : pip install poetry
26
+ - run : task install
27
+ - run : task lint-ci
28
+
29
+ pytest :
30
+ runs-on : ubuntu-latest
31
+ strategy :
32
+ fail-fast : false
33
+ matrix :
34
+ python-version :
35
+ - " 3.10"
36
+ - " 3.11"
37
+ - " 3.12"
38
+ steps :
39
+ - uses : actions/checkout@v3
40
+ - uses : actions/setup-python@v4
41
+ with :
42
+ python-version : ${{ matrix.python-version }}
43
+ - uses : arduino/setup-task@v1
44
+ with :
45
+ repo-token : ${{ github.token }}
46
+ - run : pip install poetry
47
+ - run : task install
48
+ - run : task tests
Original file line number Diff line number Diff line change @@ -13,7 +13,29 @@ tasks:
13
13
- poetry run ruff check . --fix
14
14
- poetry run mypy .
15
15
16
+ lint-ci :
17
+ desc : " run linters"
18
+ cmds :
19
+ - poetry run ruff format . --check
20
+ - poetry run ruff check . --no-fix
21
+ - poetry run mypy .
22
+
16
23
tests :
17
24
desc : " run pytest (pass args after '--')"
18
25
cmds :
19
26
- poetry run pytest {{.CLI_ARGS}}
27
+
28
+ release :
29
+ desc : " bump version, create tag and release, publish to PYPI"
30
+ cmds :
31
+ - rm -rf ./dist
32
+ - poetry version {{.CLI_ARGS}}
33
+ - git add pyproject.toml
34
+ - git commit -m "bump version to {{.CLI_ARGS}}"
35
+ - poetry build
36
+ - twine upload dist/*
37
+ - git tag {{.CLI_ARGS}}
38
+ - git push
39
+ - git push --tags
40
+ - gh release create --generate-notes {{.CLI_ARGS}}
41
+ - gh release upload {{.CLI_ARGS}} ./dist/*
You can’t perform that action at this time.
0 commit comments