Skip to content

Commit e2ccdf3

Browse files
authored
ci: add code checks on merge to main and publish (#75)
This commit adds the code quality (lint, format, unit/integration tests) checks after merge to `main` and before publishing to PyPI. This is just an extra sanity check to be extra sure we won't publish bad code accidentally.
1 parent b239832 commit e2ccdf3

File tree

3 files changed

+26
-1
lines changed

3 files changed

+26
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
kind: Chore
2+
body: Add code quality check on merge to `main` and on publish to PyPI
3+
time: 2025-03-31T13:34:22.952433+02:00

.github/workflows/code-quality.yaml

+15-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,25 @@
11
name: Code quality
22
on:
3+
workflow_dispatch:
4+
5+
workflow_call:
6+
secrets:
7+
TEST_HOST:
8+
required: true
9+
TEST_ENV_ID:
10+
required: true
11+
TEST_TOKEN:
12+
required: true
13+
314
pull_request:
415

16+
push:
17+
branches:
18+
- main
19+
520
jobs:
621
code-quality:
722
runs-on: ubuntu-latest
8-
if: "!startsWith(github.event.pull_request.title, 'version:')"
923
steps:
1024
- uses: actions/checkout@v4
1125

.github/workflows/publish.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,15 @@ on:
66
- '[0-9]+.[0-9]+.[0-9]+-[a-zA-Z]*'
77

88
jobs:
9+
code-quality:
10+
uses: ./.github/workflows/code-quality.yaml
11+
secrets:
12+
TEST_HOST: ${{ secrets.TEST_HOST }}
13+
TEST_ENV_ID: ${{ secrets.TEST_ENV_ID }}
14+
TEST_TOKEN: ${{ secrets.TEST_TOKEN }}
15+
916
pypi-publish:
17+
needs: [code-quality]
1018
runs-on: ubuntu-latest
1119
environment:
1220
name: release

0 commit comments

Comments
 (0)