File tree 2 files changed +108
-0
lines changed
2 files changed +108
-0
lines changed Original file line number Diff line number Diff line change
1
+ # This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2
+ # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
3
+
4
+ name : Python package
5
+
6
+ on :
7
+ push :
8
+ branches :
9
+ - master
10
+
11
+ pull_request :
12
+ branches :
13
+ - master
14
+
15
+ jobs :
16
+ build :
17
+ name : Build & Test
18
+
19
+ strategy :
20
+ fail-fast : false
21
+ matrix :
22
+ python-version : ["3.7", "3.8", "3.9", "3.10"]
23
+ os : [ubuntu-latest, macos-latest, windows-latest]
24
+
25
+ runs-on : ${{ matrix.os }}
26
+ steps :
27
+ - uses : actions/checkout@v3
28
+ - name : Set up Python ${{ matrix.python-version }}
29
+ uses : actions/setup-python@v3
30
+ with :
31
+ python-version : ${{ matrix.python-version }}
32
+
33
+ - name : Install Poetry
34
+ uses : abatilo/actions-poetry@v2
35
+
36
+ - name : Install dependencies
37
+ run : |
38
+ poetry install
39
+
40
+ - name : Run tests
41
+ run : |
42
+ poetry run pytest
43
+
44
+
45
+ lint :
46
+ name : Lint
47
+ runs-on : ubuntu-latest
48
+
49
+ steps :
50
+ - uses : actions/checkout@v3
51
+ - name : Set up Python 3.9
52
+ uses : actions/setup-python@v3
53
+ with :
54
+ python-version : 3.9
55
+
56
+ - name : Install Poetry
57
+ uses : abatilo/actions-poetry@v2
58
+
59
+ - name : Install dependencies
60
+ run : |
61
+ poetry install
62
+
63
+ - name : Run tests
64
+ run : |
65
+ poetry run black --check .
66
+
Original file line number Diff line number Diff line change
1
+ name : Lint PR Title
2
+
3
+ on :
4
+ pull_request_target :
5
+ types :
6
+ - opened
7
+ - edited
8
+ - synchronize
9
+
10
+ jobs :
11
+ main :
12
+ name : PR Title Checks
13
+ runs-on : ubuntu-latest
14
+ steps :
15
+
16
+ env :
17
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
18
+ # Optionally, you can provide options for further constraints.
19
+ with :
20
+ # Configure which types are allowed.
21
+ # Default: https://github.com/commitizen/conventional-commit-types
22
+ types : |
23
+ chore
24
+ docs
25
+ feat
26
+ fix
27
+ refactor
28
+ style
29
+ test
30
+ # Configure which scopes are allowed.
31
+ scopes : |
32
+ deps
33
+ deps-dev
34
+ # Configure that a scope must always be provided.
35
+ requireScope : false
36
+ # For work-in-progress PRs you can typically use draft pull requests
37
+ # from Github. However, private repositories on the free plan don't have
38
+ # this option and therefore this action allows you to opt-in to using the
39
+ # special "[WIP]" prefix to indicate this state. This will avoid the
40
+ # validation of the PR title and the pull request checks remain pending.
41
+ # Note that a second check will be reported if this is enabled.
42
+ wip : true
You can’t perform that action at this time.
0 commit comments