Skip to content

Commit d8b29c7

Browse files
committed
ci: setup github actions
Signed-off-by: Daniel Bluhm <[email protected]>
1 parent cce9260 commit d8b29c7

File tree

3 files changed

+66
-0
lines changed

3 files changed

+66
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Code Quality Check
2+
3+
"on":
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
format:
13+
name: Format and Lint Check
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v3
17+
- uses: psf/black@stable
18+
- uses: chartboost/ruff-action@v1

.github/workflows/publish.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Publish
2+
on:
3+
release:
4+
types: [created]
5+
6+
jobs:
7+
deploy:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
id-token: write
11+
12+
steps:
13+
- uses: actions/checkout@v3
14+
- name: Setup Python
15+
uses: pdm-project/setup-pdm@v3
16+
with:
17+
python-version: 3.9
18+
cache: true
19+
- name: Install dependencies
20+
run: pdm install
21+
- name: Run pytest
22+
run: pdm run pytest
23+
- name: Publish
24+
run: pdm publish

.github/workflows/tests.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Tests
2+
on:
3+
push:
4+
branches: [ main ]
5+
pull_request:
6+
branches: [ main ]
7+
8+
jobs:
9+
test:
10+
name: Tests
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ["3.9", "3.10", "3.11"]
15+
steps:
16+
- uses: actions/checkout@v3
17+
- uses: pdm-project/setup-pdm@v3
18+
with:
19+
python-version: ${{ matrix.python-version }}
20+
cache: true
21+
- name: Install dependencies
22+
run: pdm install
23+
- name: Run pytest
24+
run: pdm run pytest

0 commit comments

Comments
 (0)