Skip to content

Commit 1c722af

Browse files
committed
Add initial checks for Typescript library
1 parent 51d29e2 commit 1c722af

File tree

4 files changed

+45
-42
lines changed

4 files changed

+45
-42
lines changed

.github/workflows/checks.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,7 @@ on:
99
- "v*.*.*"
1010

1111
jobs:
12-
checks:
12+
python:
1313
uses: ./.github/workflows/python-checks.yml
14+
typescript:
15+
uses: ./.github/workflows/typescript-checks.yml

.github/workflows/pull-request-checks.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,7 @@ on:
44
pull_request:
55

66
jobs:
7-
checks:
7+
python:
88
uses: ./.github/workflows/python-checks.yml
9+
typescript:
10+
uses: ./.github/workflows/typescript-checks.yml

.github/workflows/python-checks.yml

Lines changed: 6 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ on:
44
workflow_call:
55

66
jobs:
7-
format:
7+
check_python:
8+
name: Check Python library
89
runs-on: ubuntu-latest
910
steps:
1011
- uses: actions/checkout@v4
@@ -23,53 +24,18 @@ jobs:
2324
run: uv sync --frozen --all-extras --dev
2425
working-directory: ./src/python
2526

26-
- name: Run ruff format check
27-
run: uv run --frozen ruff check .
27+
- name: Build
28+
run: uv build
2829
working-directory: ./src/python
2930

30-
typecheck:
31-
runs-on: ubuntu-latest
32-
steps:
33-
- uses: actions/checkout@v4
34-
35-
- name: Install uv
36-
uses: astral-sh/setup-uv@v3
37-
with:
38-
enable-cache: true
39-
40-
- name: "Set up Python"
41-
uses: actions/setup-python@v5
42-
with:
43-
python-version-file: "src/python/.python-version"
44-
45-
- name: Install the project
46-
run: uv sync --frozen --all-extras --dev
31+
- name: Run ruff format check
32+
run: uv run --frozen ruff check .
4733
working-directory: ./src/python
4834

4935
- name: Run pyright
5036
run: uv run --frozen pyright
5137
working-directory: ./src/python
5238

53-
build:
54-
runs-on: ubuntu-latest
55-
56-
steps:
57-
- uses: actions/checkout@v4
58-
59-
- name: Install uv
60-
uses: astral-sh/setup-uv@v3
61-
with:
62-
enable-cache: true
63-
64-
- name: "Set up Python"
65-
uses: actions/setup-python@v5
66-
with:
67-
python-version-file: "src/python/.python-version"
68-
69-
- name: Install the project
70-
run: uv sync --frozen --all-extras --dev
71-
working-directory: ./src/python
72-
7339
- name: Run pytest
7440
run: uv run --frozen pytest
7541
working-directory: ./src/python
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Typescript Checks
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
check_typscript:
8+
name: Check Typescript library
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
13+
- name: "Set up Typescript"
14+
uses: actions/setup-node@v4
15+
with:
16+
node-version: 20
17+
cache: npm
18+
19+
- name: Install dependencies
20+
run: npm ci
21+
working-directory: ./src/typescript
22+
23+
- name: Build
24+
run: npm run build
25+
working-directory: ./src/typescript
26+
27+
- name: Test
28+
run: npm test
29+
working-directory: ./src/typescript
30+
31+
- name: Lint
32+
run: npm run lint
33+
working-directory: ./src/typescript

0 commit comments

Comments
 (0)