-
Notifications
You must be signed in to change notification settings - Fork 1
63 lines (63 loc) · 2.16 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
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
- run: cd socnet_rs && cargo +stable clippy --all-targets --all-features -- -Dwarnings -Wclippy::pedantic
run-eslint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
- run: npm ci
- run: npx eslint --max-warnings 0 .
run-pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: pipx run pre-commit run --all-files --show-diff-on-failure
run-pytest-mypy:
runs-on: ubuntu-latest
env:
DOCKER_BUILDKIT: "1"
steps:
- uses: actions/checkout@v4
- run: cp .env.example .env
- run: docker compose -f docker-compose.yml -f docker-compose.ci.yml pull --ignore-buildable
- id: build
run: docker compose -f docker-compose.yml -f docker-compose.ci.yml build --pull
- run: docker compose -f docker-compose.yml -f docker-compose.ci.yml run --rm django python3 manage.py migrate
- run: docker compose -f docker-compose.yml -f docker-compose.ci.yml run --rm django pytest --cov
- if: ${{ steps.build.conclusion == 'success' }}
run: docker compose -f docker-compose.yml -f docker-compose.ci.yml run --rm django mypy .
- if: ${{ steps.build.conclusion == 'success' }}
run: docker compose -f docker-compose.yml -f docker-compose.ci.yml down --remove-orphans
run-rustfmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: rustup toolchain install nightly --profile minimal --component rustfmt --no-self-update --allow-downgrade
- run: cd socnet_rs && cargo +nightly fmt --check
run-tsc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
- run: npm ci
- run: npx tsc --noEmit