Skip to content

Commit 7a49be6

Browse files
authored
tests: Add unit and integration tests (#90)
* Add tests for fluxqueue-common serialize.rs * Update workflow files * Add worker unit tests * Remove unnecessary doc strings * Update python tests * Add integration tests for worker * Updates
1 parent 1a4d61a commit 7a49be6

22 files changed

Lines changed: 1996 additions & 157 deletions

.github/workflows/deploy-docs.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@ on:
77

88
jobs:
99
deploy-docs:
10+
if: (github.repository_owner == 'ccxlv')
1011
runs-on: ubuntu-latest
1112

1213
steps:
13-
- name: Checkout Repo
14+
- name: Checkout Repository
1415
uses: actions/checkout@v4
1516

1617
- name: Setup Python3.13

.github/workflows/publish.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ jobs:
6464
path: dist
6565

6666
release:
67+
if: (github.repository_owner == 'ccxlv') && ${{ startsWith(github.event.release.tag_name, 'v') }}
6768
name: Release
6869
runs-on: ubuntu-latest
69-
if: ${{ startsWith(github.event.release.tag_name, 'v') }}
7070
needs: [linux, sdist]
7171
permissions:
7272
# Use to sign the release artifacts
@@ -87,5 +87,4 @@ jobs:
8787
with:
8888
subject-path: "dist/**/*"
8989
- name: Publish to PyPI
90-
if: ${{ startsWith(github.event.release.tag_name, 'v') }}
9190
run: uv publish "dist/**/*"

.github/workflows/release-worker.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ env:
1010

1111
jobs:
1212
linux:
13+
if: (github.repository_owner == 'ccxlv')
1314
runs-on: ubuntu-latest
1415
strategy:
1516
matrix:
@@ -53,6 +54,7 @@ jobs:
5354
path: dist/*
5455

5556
release:
57+
if: (github.repository_owner == 'ccxlv')
5658
needs: [linux]
5759
runs-on: ubuntu-latest
5860
permissions:

.github/workflows/tests.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Tests
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- "**"
7+
push:
8+
branches:
9+
- main
10+
11+
jobs:
12+
linux:
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
python-version: ["3.11", "3.12", "3.13", "3.14"]
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- uses: actions/setup-python@v5
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
cache: pip
25+
26+
- run: python -m pip install --upgrade pip
27+
28+
- uses: dtolnay/rust-toolchain@stable
29+
30+
- uses: Swatinem/rust-cache@v2
31+
32+
- run: pip install -e .[tests]
33+
34+
- run: scripts/check-prettier.sh
35+
- run: cargo fmt --all -- --check
36+
- run: cargo clippy --workspace -- -D warnings
37+
- run: pytest tests/
38+
- run: cargo test --workspace --locked

0 commit comments

Comments
 (0)