-
Notifications
You must be signed in to change notification settings - Fork 142
53 lines (53 loc) · 1.4 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
name: Continuous Integration
on:
pull_request:
push:
branches: [master, dev, trying, staging]
jobs:
msrv:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Get current MSRV from Cargo.toml
id: current_msrv
run: |
msrv=$(cat testcontainers/Cargo.toml | grep rust-version | sed 's/.* = "//; s/"//')
echo "::set-output name=msrv::$msrv"
- uses: actions-rs/toolchain@v1
id: toolchain
with:
profile: minimal
toolchain: ${{steps.current_msrv.outputs.msrv}}
override: true
- uses: Swatinem/[email protected]
- run: cargo build
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
id: toolchain
with:
profile: minimal
toolchain: stable
override: true
- uses: Swatinem/[email protected]
- run: cargo test
style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dprint/[email protected]
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
id: toolchain
with:
profile: minimal
toolchain: stable
override: true
components: clippy
- uses: Swatinem/[email protected]
- run: cargo clippy --all-targets -- -D warnings