@@ -4,7 +4,7 @@ name: Python CI
44
55on :
66 push :
7- branches : ["master", " main"]
7+ branches : ["main"]
88 pull_request :
99 branches-ignore : ['dependabot/**']
1010 workflow_dispatch :
1515
1616env :
1717 REPORTS_DIR : CI_reports
18- PYTHON_VERISON_DEFAULT : " 3.10 "
19- POETRY_VERSION : " 1.1.11 "
18+ PYTHON_VERSION_DEFAULT : " 3.11 "
19+ POETRY_VERSION : " 1.1.12 "
2020
2121jobs :
2222 coding-standards :
@@ -27,19 +27,23 @@ jobs:
2727 - name : Checkout
2828 # see https://github.com/actions/checkout
2929 uses : actions/checkout@v3
30+
3031 - name : Setup Python Environment
3132 # see https://github.com/actions/setup-python
3233 uses : actions/setup-python@v4
3334 with :
34- python-version : ${{ env.PYTHON_VERISON_DEFAULT }}
35+ python-version : ${{ env.PYTHON_VERSION_DEFAULT }}
3536 architecture : ' x64'
37+
3638 - name : Install poetry
3739 # see https://github.com/marketplace/actions/setup-poetry
3840 uses : Gr1N/setup-poetry@v8
3941 with :
4042 poetry-version : ${{ env.POETRY_VERSION }}
43+
4144 - name : Install dependencies
4245 run : poetry install --no-root
46+
4347 - name : Run tox
4448 run : poetry run tox -e flake8 -s false
4549
5357 include :
5458 - # test with the locked dependencies
5559 os : ubuntu-latest
56- python-version : ' 3.10 '
60+ python-version : ' 3.11 '
5761 toxenv-factor : ' locked'
5862 - # test with the lowest dependencies
5963 os : ubuntu-latest
@@ -63,19 +67,23 @@ jobs:
6367 - name : Checkout
6468 # see https://github.com/actions/checkout
6569 uses : actions/checkout@v3
70+
6671 - name : Setup Python Environment
6772 # see https://github.com/actions/setup-python
6873 uses : actions/setup-python@v4
6974 with :
7075 python-version : ${{ matrix.python-version }}
7176 architecture : ' x64'
77+
7278 - name : Install poetry
7379 # see https://github.com/marketplace/actions/setup-poetry
7480 uses : Gr1N/setup-poetry@v8
7581 with :
7682 poetry-version : ${{ env.POETRY_VERSION }}
83+
7784 - name : Install dependencies
7885 run : poetry install --no-root
86+
7987 - name : Run tox
8088 run : poetry run tox -e mypy-${{ matrix.toxenv-factor }} -s false
8189
9098 matrix :
9199 os : ['ubuntu-latest', 'windows-latest', 'macos-latest']
92100 python-version :
93- - " 3.10" # highest supported
101+ - " 3.11" # highest supported
102+ - " 3.10"
94103 - " 3.9"
95104 - " 3.8"
96105 - " 3.7" # lowest supported
@@ -105,35 +114,45 @@ jobs:
105114 run : |
106115 git config --global core.autocrlf false
107116 git config --global core.eol lf
117+
108118 - name : Checkout
109119 # see https://github.com/actions/checkout
110120 uses : actions/checkout@v3
121+
111122 - name : Create reports directory
112123 run : mkdir ${{ env.REPORTS_DIR }}
124+
113125 - name : Setup Python Environment
114126 # see https://github.com/actions/setup-python
115127 uses : actions/setup-python@v4
116128 with :
117129 python-version : ${{ matrix.python-version }}
118130 architecture : ' x64'
131+
119132 - name : Validate Python Environment
120133 run : echo "import sys; print('Python %s on %s in %s' % (sys.version, sys.platform, sys.getdefaultencoding()))" | python
134+
121135 - name : Install poetry
122136 # see https://github.com/marketplace/actions/setup-poetry
123137 uses : Gr1N/setup-poetry@v8
124138 with :
125139 poetry-version : ${{ env.POETRY_VERSION }}
140+
126141 - name : Install dependencies
127142 run : poetry install --no-root
143+
128144 - name : Ensure build successful
129145 run : poetry build
146+
130147 - name : Run tox
131148 run : poetry run tox -e py-${{ matrix.toxenv-factor }} -s false
149+
132150 - name : Generate coverage reports
133151 run : >
134152 poetry run coverage report &&
135153 poetry run coverage xml -o ${{ env.REPORTS_DIR }}/coverage-${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.toxenv-factor }}.xml &&
136154 poetry run coverage html -d ${{ env.REPORTS_DIR }}
155+
137156 - name : Artifact reports
138157 if : ${{ ! cancelled() }}
139158 # see https://github.com/actions/upload-artifact
0 commit comments