1010
1111permissions :
1212 contents : read
13+ id-token : write
1314
1415jobs :
1516 check-linting :
16- runs-on : ubuntu-latest
17+ runs-on :
18+ group : databricks-protected-runner-group
19+ labels : linux-ubuntu-latest
1720 strategy :
1821 matrix :
1922 python-version : [3.9, "3.10", "3.11", "3.12"]
2023 steps :
21- # ----------------------------------------------
22- # check-out repo and set-up python
23- # ----------------------------------------------
2424 - name : Check out repository
25- uses : actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2
26- - name : Set up python ${{ matrix.python-version }}
27- id : setup-python
28- uses : actions/setup-python@e9aba2c848f5ebd159c070c61ea2c4e2b122355e # v2
25+ uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
26+ - name : Setup Poetry
27+ uses : ./.github/actions/setup-poetry
2928 with :
3029 python-version : ${{ matrix.python-version }}
31- # ----------------------------------------------
32- # ----- install & configure poetry -----
33- # ----------------------------------------------
34- - name : Install Poetry
35- uses : snok/install-poetry@76e04a911780d5b312d89783f7b1cd627778900a # v1
36- with :
37- version : " 2.2.1"
38- virtualenvs-create : true
39- virtualenvs-in-project : true
40- installer-parallel : true
41-
42- # ----------------------------------------------
43- # load cached venv if cache exists
44- # ----------------------------------------------
45- - name : Load cached venv
46- id : cached-poetry-dependencies
47- uses : actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
48- with :
49- path : .venv
50- key : venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ github.event.repository.name }}-${{ hashFiles('**/poetry.lock') }}
51- # ----------------------------------------------
52- # install dependencies if cache does not exist
53- # ----------------------------------------------
54- - name : Install dependencies
55- if : steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
56- run : poetry install --no-interaction --no-root
57- # ----------------------------------------------
58- # install your root project, if required
59- # ----------------------------------------------
60- - name : Install library
61- run : poetry install --no-interaction
62- # ----------------------------------------------
63- # black the code
64- # ----------------------------------------------
6530 - name : Black
6631 run : poetry run black --check src
6732
6833 check-types :
69- runs-on : ubuntu-latest
34+ runs-on :
35+ group : databricks-protected-runner-group
36+ labels : linux-ubuntu-latest
7037 strategy :
7138 matrix :
7239 python-version : [3.9, "3.10", "3.11", "3.12"]
7340 steps :
74- # ----------------------------------------------
75- # check-out repo and set-up python
76- # ----------------------------------------------
7741 - name : Check out repository
78- uses : actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2
79- - name : Set up python ${{ matrix.python-version }}
80- id : setup-python
81- uses : actions/setup-python@e9aba2c848f5ebd159c070c61ea2c4e2b122355e # v2
42+ uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
43+ - name : Setup Poetry
44+ uses : ./.github/actions/setup-poetry
8245 with :
8346 python-version : ${{ matrix.python-version }}
84- # ----------------------------------------------
85- # ----- install & configure poetry -----
86- # ----------------------------------------------
87- - name : Install Poetry
88- uses : snok/install-poetry@76e04a911780d5b312d89783f7b1cd627778900a # v1
89- with :
90- version : " 2.2.1"
91- virtualenvs-create : true
92- virtualenvs-in-project : true
93- installer-parallel : true
94-
95- # ----------------------------------------------
96- # load cached venv if cache exists
97- # ----------------------------------------------
98- - name : Load cached venv
99- id : cached-poetry-dependencies
100- uses : actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
101- with :
102- path : .venv
103- key : venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ github.event.repository.name }}-${{ hashFiles('**/poetry.lock') }}
104- # ----------------------------------------------
105- # install dependencies if cache does not exist
106- # ----------------------------------------------
107- - name : Install dependencies
108- if : steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
109- run : poetry install --no-interaction --no-root
110- # ----------------------------------------------
111- # install your root project, if required
112- # ----------------------------------------------
113- - name : Install library
114- run : poetry install --no-interaction
115- # ----------------------------------------------
116- # mypy the code
117- # ----------------------------------------------
11847 - name : Mypy
11948 run : |
120- mkdir .mypy_cache # Workaround for bad error message "error: --install-types failed (no mypy cache directory)"; see https://github.com/python/mypy/issues/10768#issuecomment-2178450153
121- poetry run mypy --install-types --non-interactive src
49+ mkdir .mypy_cache
50+ poetry run mypy --install-types --non-interactive src
0 commit comments