Skip to content

Commit 664902a

Browse files
committed
fix: Combine lint and test jobs and remove duplicates for release job
1 parent 2feae33 commit 664902a

File tree

2 files changed

+33
-1
lines changed

2 files changed

+33
-1
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Lint and Test
2+
on:
3+
pull_request:
4+
push:
5+
branches: [main]
6+
jobs:
7+
lint:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
- uses: actions/setup-python@v5
12+
with:
13+
python-version: 3.12
14+
- uses: pre-commit/[email protected]
15+
test:
16+
runs-on: ${{ matrix.os }}
17+
strategy:
18+
matrix:
19+
os: [ubuntu-latest]
20+
python-version: ["3.12"]
21+
steps:
22+
- uses: actions/checkout@v4
23+
- name: Set up Python
24+
uses: actions/setup-python@v5
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
- name: Run image
28+
uses: abatilo/actions-poetry@v2
29+
- name: Install dependencies
30+
run: poetry install --with=dev
31+
- name: Run tests
32+
run: poetry run pytest

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: release
22
on:
33
workflow_run:
4-
workflows: [pre-commit, pytest]
4+
workflows: [Lint and Test]
55
types: [completed]
66
jobs:
77
release:

0 commit comments

Comments
 (0)