Skip to content

Commit 8e17cdd

Browse files
committed
Add github actions/workflows for lint and testing
1 parent b2a0bde commit 8e17cdd

4 files changed

Lines changed: 69 additions & 0 deletions

File tree

.github/actions/setup/action.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Setup Environment
2+
description: Setup the python environment using uv with all dependency groups installed
3+
4+
runs:
5+
using: composite
6+
7+
steps:
8+
- name: Install uv
9+
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
10+
with:
11+
enable-cache: true
12+
13+
- name: Install dependencies
14+
run: uv sync --all-groups
15+
shell: bash

.github/workflows/integration.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Integration Tests
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
integration:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: Checkout repository
12+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
13+
14+
- name: Setup environment
15+
uses: ./.github/actions/setup
16+
17+
- name: Run integration tests
18+
run: uv run pytest -m "integration"

.github/workflows/lint.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Lint Check
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
lint:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: Checkout repository
12+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
13+
14+
- name: Setup environment
15+
uses: ./.github/actions/setup
16+
17+
- name: Ruff check
18+
run: uv run ruff check

.github/workflows/test.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Unit Tests
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
test:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: Checkout repository
12+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
13+
14+
- name: Setup environment
15+
uses: ./.github/actions/setup
16+
17+
- name: Run pytest
18+
run: uv run pytest

0 commit comments

Comments
 (0)