File tree Expand file tree Collapse file tree 3 files changed +257
-188
lines changed Expand file tree Collapse file tree 3 files changed +257
-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
+
9
+ concurrency :
10
+ group : ${{ github.head_ref || github.run_id }}
11
+ cancel-in-progress : true
12
+
13
+ jobs :
14
+ lint :
15
+ runs-on : ubuntu-latest
16
+ steps :
17
+ - uses : actions/checkout@v3
18
+ - uses : actions/setup-python@v4
19
+ with :
20
+ python-version : " 3.10"
21
+ - uses : arduino/setup-task@v1
22
+ with :
23
+ repo-token : ${{ github.token }}
24
+ - run : pip install poetry
25
+ - run : task install
26
+ - run : task lint-ci
27
+
28
+ pytest :
29
+ runs-on : ubuntu-latest
30
+ strategy :
31
+ fail-fast : false
32
+ matrix :
33
+ python-version :
34
+ - " 3.10"
35
+ - " 3.11"
36
+ - " 3.12"
37
+ steps :
38
+ - uses : actions/checkout@v3
39
+ - uses : actions/setup-python@v4
40
+ with :
41
+ python-version : ${{ matrix.python-version }}
42
+ - uses : arduino/setup-task@v1
43
+ with :
44
+ repo-token : ${{ github.token }}
45
+ - run : pip install poetry
46
+ - run : task install
47
+ - 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