-
Notifications
You must be signed in to change notification settings - Fork 7
63 lines (60 loc) · 2.08 KB
/
rust_checks.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: Format, Clippy and Tests
on:
push:
branches:
- development
- main
pull_request:
types:
- opened
- reopened
- synchronize
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
format-clippy-test:
name: Format, Clippy and Tests
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build network PostgreSQL Docker image
run: docker build -t helikon/subvt-network-postgres --no-cache -f $GITHUB_WORKSPACE/_docker/network/01-subvt-network-postgres.dockerfile $GITHUB_WORKSPACE
- name: Build app PostgreSQL Docker image
run: docker build -t helikon/subvt-app-postgres --no-cache -f $GITHUB_WORKSPACE/_docker/app/01-subvt-app-postgres.dockerfile $GITHUB_WORKSPACE
- name: Run Docker network Redis
run: docker run -d -t -p 6379:6379 redis:7.0
- name: Run Docker network PostgreSQL
run: docker run -d -t -p 15432:5432 helikon/subvt-network-postgres
- name: Run Docker app PostgreSQL
run: docker run -d -t -p 25432:5432 helikon/subvt-app-postgres
- name: Toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly #-2022-11-15 # toolchain
components: clippy, rustfmt
override: true
- run: rustup update
- run: rustup update nightly #-2022-11-15 # toolchain
- run: rustup default nightly #-2022-11-15 # toolchain
- run: rustup target add wasm32-unknown-unknown --toolchain nightly #-2022-11-15 # toolchain
- run: rustup default stable
- name: Format
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Clippy
uses: actions-rs/cargo@v1
with:
toolchain: nightly #-2022-11-15 # toolchain
command: clippy
args: --all-targets -- -D warnings -W clippy::cognitive_complexity
- name: Test
uses: actions-rs/cargo@v1
env:
SUBVT_ENV: 'test'
with:
command: test
args: -- --test-threads=1