Skip to content

Commit 7c0566e

Browse files
committed
Added a workflow to check that the library is compatible accross versions
1 parent 3d7688c commit 7c0566e

File tree

3 files changed

+92
-52
lines changed

3 files changed

+92
-52
lines changed

.github/workflows/integration.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Compatibility
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
check-compatibility:
10+
name: With Python ${{ matrix.python-version }}
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: [ '3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14' ]
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
with:
20+
path: project/library
21+
22+
- name: Checkout sanity stub
23+
uses: actions/checkout@v4
24+
with:
25+
ref: sanity
26+
path: project/sanity
27+
28+
- name: Install poetry
29+
run: |
30+
pipx install poetry
31+
32+
- name: Setup Python
33+
uses: actions/setup-python@v5
34+
with:
35+
python-version: ${{ matrix.python-version }}
36+
cache: 'poetry'
37+
38+
- name: Check Installability
39+
working-directory: project/sanity
40+
run: poetry add zitadel-client --path ../library

.github/workflows/release.yml

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,41 @@
11
name: Release
22

33
on:
4-
push:
5-
branches:
6-
- main
4+
push:
5+
branches:
6+
- main
77

88
permissions:
9-
contents: write
9+
contents: write
1010

1111
defaults:
12-
run:
13-
working-directory: ./
12+
run:
13+
working-directory: ./
1414

1515
jobs:
16-
publish-package:
17-
runs-on: ubuntu-latest
18-
19-
steps:
20-
- name: Checkout code
21-
uses: actions/checkout@v4
22-
23-
- name: Install poetry
24-
run: |
25-
pipx install poetry
26-
27-
- name: Setup Python
28-
uses: actions/setup-python@v5
29-
with:
30-
python-version-file: 'pyproject.toml'
31-
cache: 'poetry'
32-
33-
- name: Install Semantic Release
34-
run: |
35-
npm install --global semantic-release $(jq -r '.plugins[] | if type == "string" then . else .[0] end' .releaserc.json)
36-
37-
- name: Run semantic-release
38-
env:
39-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40-
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
41-
run: npx semantic-release
16+
publish-package:
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v4
22+
23+
- name: Install poetry
24+
run: |
25+
pipx install poetry
26+
27+
- name: Setup Python
28+
uses: actions/setup-python@v5
29+
with:
30+
python-version-file: 'pyproject.toml'
31+
cache: 'poetry'
32+
33+
- name: Install Semantic Release
34+
run: |
35+
npm install --global semantic-release $(jq -r '.plugins[] | if type == "string" then . else .[0] end' .releaserc.json)
36+
37+
- name: Run semantic-release
38+
env:
39+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
41+
run: npx semantic-release

.github/workflows/test.yml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,32 @@ name: Run Tests
33
on: push
44

55
permissions:
6-
contents: write
6+
contents: write
77

88
defaults:
9-
run:
10-
working-directory: ./
9+
run:
10+
working-directory: ./
1111

1212
jobs:
13-
app-testing:
14-
runs-on: ubuntu-latest
13+
app-testing:
14+
runs-on: ubuntu-latest
1515

16-
steps:
17-
- name: Checkout code
18-
uses: actions/checkout@v4
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
1919

20-
- name: Install poetry
21-
run: |
22-
pipx install poetry
20+
- name: Install poetry
21+
run: |
22+
pipx install poetry
2323
24-
- name: Setup Python
25-
uses: actions/setup-python@v5
26-
with:
27-
python-version-file: 'pyproject.toml'
28-
cache: 'poetry'
24+
- name: Setup Python
25+
uses: actions/setup-python@v5
26+
with:
27+
python-version-file: 'pyproject.toml'
28+
cache: 'poetry'
2929

30-
- name: Install Dependencies
31-
run: poetry install
30+
- name: Install Dependencies
31+
run: poetry install
3232

33-
- name: Run Tests
34-
run: poetry run pytest
33+
- name: Run Tests
34+
run: poetry run pytest

0 commit comments

Comments
 (0)