Skip to content

Commit e6907b9

Browse files
committed
revert to steps only
1 parent c5e9552 commit e6907b9

1 file changed

Lines changed: 25 additions & 129 deletions

File tree

.github/workflows/python_ci.yaml

Lines changed: 25 additions & 129 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
name: python-ci
22

3-
permissions:
4-
contents: read
5-
63
on:
74
release:
85
types: [ created ]
@@ -13,154 +10,53 @@ on:
1310
workflow_call:
1411

1512
jobs:
16-
lint:
13+
test-python:
1714
runs-on: ubuntu-latest
1815
defaults:
1916
run:
2017
working-directory: python
2118
steps:
22-
- uses: actions/checkout@v4
19+
- name: Checkout code
20+
uses: actions/checkout@v2
2321

24-
- uses: actions/setup-python@v4
22+
- name: Set up Python
23+
uses: actions/setup-python@v2
2524
with:
2625
python-version: "3.8"
2726

28-
- uses: actions/cache@v3
29-
with:
30-
path: ~/.cache/pip
31-
key: ${{ runner.os }}-pip-${{ hashFiles('python/pyproject.toml') }}
32-
restore-keys: |
33-
${{ runner.os }}-pip-
34-
35-
- run: |
27+
- name: Pip install
28+
id: install
29+
run: |
3630
python -m pip install --upgrade pip
3731
pip install '.[development,openssl,tdms,rosbags,hdf5,sift-stream]'
32+
33+
- name: Lint
34+
run: |
3835
ruff check
3936
40-
format:
41-
runs-on: ubuntu-latest
42-
defaults:
43-
run:
44-
working-directory: python
45-
steps:
46-
- uses: actions/checkout@v4
47-
- uses: actions/setup-python@v4
48-
with:
49-
python-version: "3.8"
50-
- uses: actions/cache@v3
51-
with:
52-
path: ~/.cache/pip
53-
key: ${{ runner.os }}-pip-${{ hashFiles('python/pyproject.toml') }}
54-
restore-keys: |
55-
${{ runner.os }}-pip-
56-
- run: |
57-
python -m pip install --upgrade pip
58-
pip install '.[development,openssl,tdms,rosbags,hdf5,sift-stream]'
37+
- name: Format
38+
run: |
5939
ruff format --check
6040
61-
mypy:
62-
runs-on: ubuntu-latest
63-
defaults:
64-
run:
65-
working-directory: python
66-
steps:
67-
- uses: actions/checkout@v4
68-
- uses: actions/setup-python@v4
69-
with:
70-
python-version: "3.8"
71-
- uses: actions/cache@v3
72-
with:
73-
path: ~/.cache/pip
74-
key: ${{ runner.os }}-pip-${{ hashFiles('python/pyproject.toml') }}
75-
restore-keys: |
76-
${{ runner.os }}-pip-
77-
- run: |
78-
python -m pip install --upgrade pip
79-
pip install '.[development,openssl,tdms,rosbags,hdf5,sift-stream]'
41+
- name: MyPy
42+
run: |
8043
mypy lib
8144
82-
pyright:
83-
runs-on: ubuntu-latest
84-
defaults:
85-
run:
86-
working-directory: python
87-
steps:
88-
- uses: actions/checkout@v4
89-
- uses: actions/setup-python@v4
90-
with:
91-
python-version: "3.8"
92-
- uses: actions/cache@v3
93-
with:
94-
path: ~/.cache/pip
95-
key: ${{ runner.os }}-pip-${{ hashFiles('python/pyproject.toml') }}
96-
restore-keys: |
97-
${{ runner.os }}-pip-
98-
- run: |
99-
python -m pip install --upgrade pip
100-
pip install '.[development,openssl,tdms,rosbags,hdf5,sift-stream]'
45+
- name: Pyright
46+
run: |
10147
pyright lib
10248
103-
unit-tests:
104-
runs-on: ubuntu-latest
105-
defaults:
106-
run:
107-
working-directory: python
108-
steps:
109-
- uses: actions/checkout@v4
110-
- uses: actions/setup-python@v4
111-
with:
112-
python-version: "3.8"
113-
- uses: actions/cache@v3
114-
with:
115-
path: ~/.cache/pip
116-
key: ${{ runner.os }}-pip-${{ hashFiles('python/pyproject.toml') }}
117-
restore-keys: |
118-
${{ runner.os }}-pip-
119-
- run: |
120-
python -m pip install --upgrade pip
121-
pip install '.[development,openssl,tdms,rosbags,hdf5,sift-stream]'
49+
- name: Pytest Unit Tests
50+
run: |
12251
pytest -m "not integration"
12352
124-
integration-tests:
125-
runs-on: ubuntu-latest
126-
defaults:
127-
run:
128-
working-directory: python
129-
steps:
130-
- uses: actions/checkout@v4
131-
- uses: actions/setup-python@v4
132-
with:
133-
python-version: "3.8"
134-
- uses: actions/cache@v3
135-
with:
136-
path: ~/.cache/pip
137-
key: ${{ runner.os }}-pip-${{ hashFiles('python/pyproject.toml') }}
138-
restore-keys: |
139-
${{ runner.os }}-pip-
140-
- run: |
141-
python -m pip install --upgrade pip
142-
pip install '.[development,openssl,tdms,rosbags,hdf5,sift-stream]'
53+
- name: Pytest Integration Tests
54+
run: |
14355
pytest -m "integration"
14456
145-
sync-stubs-mypy:
146-
runs-on: ubuntu-latest
147-
defaults:
148-
run:
57+
- name: Sync Stubs Mypy
14958
working-directory: python/lib
150-
steps:
151-
- uses: actions/checkout@v4
152-
- uses: actions/setup-python@v4
153-
with:
154-
python-version: "3.8"
155-
- uses: actions/cache@v3
156-
with:
157-
path: ~/.cache/pip
158-
key: ${{ runner.os }}-pip-${{ hashFiles('python/pyproject.toml') }}
159-
restore-keys: |
160-
${{ runner.os }}-pip-
161-
- run: |
162-
python -m pip install --upgrade pip
163-
pip install '.[development,openssl,tdms,rosbags,hdf5,sift-stream]'
59+
run: |
16460
stubtest \
165-
--mypy-config-file ../pyproject.toml \
166-
sift_client.resources.sync_stubs
61+
--mypy-config-file ../pyproject.toml \
62+
sift_client.resources.sync_stubs

0 commit comments

Comments
 (0)