Skip to content

Commit 75dbb50

Browse files
Feat/Add new workflows for test and release (#36)
* Add test workflow. * Add publish workflow * Remove reference to step that doesn't exist * Ensure no sources, probably not needed * Concurrency constraints for test workflow. * Concurrency constraints for test workflow. * Concurrency constraints for test workflow. * Concurrency constraints for test workflow.
1 parent 83ea5dd commit 75dbb50

File tree

2 files changed

+64
-0
lines changed

2 files changed

+64
-0
lines changed

.github/workflows/release.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
on:
2+
release:
3+
types: [created]
4+
5+
jobs:
6+
deploy:
7+
runs-on: ubuntu-latest
8+
environment: release
9+
permissions:
10+
id-token: write
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: Set up Python
14+
uses: actions/setup-python@v5
15+
with:
16+
python-version: '3.11'
17+
18+
- name: Install uv
19+
uses: astral-sh/setup-uv@v5
20+
with:
21+
version: "0.6.16"
22+
23+
- name: Install project with uv
24+
run: uv sync --locked --all-extras --dev
25+
26+
- name: Build package
27+
run: uv build --no-sources
28+
29+
- name: Publish
30+
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/test_types.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
2+
name: Run Pytests and MyPy
3+
4+
on: [pull_request, push]
5+
6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.ref }}
8+
cancel-in-progress: true
9+
10+
jobs:
11+
run-tests:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
17+
- name: Set up Python
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: 3.12
21+
22+
- name: Install uv
23+
uses: astral-sh/setup-uv@v5
24+
with:
25+
version: "0.6.16"
26+
27+
- name: Install project with uv
28+
run: uv sync --locked --all-extras --dev
29+
30+
- name: Install tox
31+
run: uv tool install tox --with tox-uv
32+
33+
- name: Run tests with tox
34+
run: tox run

0 commit comments

Comments
 (0)