-
Notifications
You must be signed in to change notification settings - Fork 1
80 lines (80 loc) · 2.62 KB
/
ci.yml
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
name: CI
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
run-clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- run: cargo +stable clippy --all-targets --all-features -- -Dwarnings -Wclippy::pedantic
working-directory: ./socnet_rs
run-eslint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
check-latest: true
- run: npm ci
- run: npx eslint --max-warnings 0 .
run-pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: astral-sh/setup-uv@v5
with:
enable-cache: false
- run: uv tool run --from pre-commit@latest --with pre-commit-uv --no-cache --python 3.13 pre-commit run --all-files
run-pytest-mypy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- run: cp .env.example .env
- run: docker compose -f compose.yaml -f compose.ci.yaml pull --ignore-buildable
- id: build
run: docker compose -f compose.yaml -f compose.ci.yaml build --pull django
- run: docker compose -f compose.yaml -f compose.ci.yaml run --rm django python3 manage.py migrate
- run: docker compose -f compose.yaml -f compose.ci.yaml run --rm django pytest --cov
- if: ${{ !cancelled() && steps.build.conclusion == 'success' }}
run: docker compose -f compose.yaml -f compose.ci.yaml run --rm django mypy .
- if: ${{ always() && steps.build.conclusion == 'success' }}
run: docker compose -f compose.yaml -f compose.ci.yaml down --remove-orphans
run-rustfmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- run: rustup toolchain install nightly --profile minimal --component rustfmt --no-self-update --allow-downgrade
- run: cargo +nightly fmt --check
working-directory: ./socnet_rs
run-tsc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
check-latest: true
- run: npm ci
- run: npx tsc --noEmit