-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (82 loc) · 2.46 KB
/
Copy pathintegration.yaml
File metadata and controls
87 lines (82 loc) · 2.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: Integration
on:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
commitlint:
name: Commit Lint
runs-on: ubuntu-latest
if: github.event.action != 'closed' || github.event.pull_request.merged != true
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Cache Bun install
uses: actions/cache@v4
with:
path: ~/.bun/install/cache
key: bun-${{ runner.os }}-${{ hashFiles('**/bun.lock', '**/package.json') }}
restore-keys: |
bun-${{ runner.os }}-
- name: Install commitlint
run: |
bun install conventional-changelog-conventionalcommits
bun install @commitlint/config-conventional@latest
bun install commitlint@latest
- name: Validate PR commits
if: github.event_name == 'pull_request'
run: |
bunx commitlint \
--from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} \
--to ${{ github.event.pull_request.head.sha }} \
--verbose
- name: Validate last commit
if: github.event_name == 'push'
run: bunx commitlint --last --verbose
ruff:
name: Ruff
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: astral-sh/setup-uv@v6
with:
enable-cache: true
- name: Ruff check
run: uvx ruff check
- name: Ruff format check
run: uvx ruff format --check
typecheck:
name: mypy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: astral-sh/setup-uv@v6
with:
enable-cache: true
- name: Install dependencies
run: uv sync --frozen
# Uncomment when the project uses Prisma (or similar codegen).
# - name: Generate Prisma client
# run: uv run prisma generate
- name: mypy
run: uv run mypy .
test:
name: pytest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: astral-sh/setup-uv@v6
with:
enable-cache: true
- name: Install dependencies
run: uv sync --frozen
# Uncomment when the project uses Prisma (or similar codegen).
# - name: Generate Prisma client
# run: uv run prisma generate
- name: pytest
run: uv run pytest