-
Notifications
You must be signed in to change notification settings - Fork 142
66 lines (61 loc) · 1.78 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
name: Continuous Integration
on:
pull_request:
merge_group:
push:
branches: [master, dev]
jobs:
msrv:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
cargo-cmd:
- build --all-features
- build --no-default-features
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: dtolnay/rust-toolchain@master
with:
toolchain: ${{steps.current_msrv.outputs.msrv}}
- uses: Swatinem/[email protected]
- run: cargo ${{ matrix['cargo-cmd'] }}
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
cargo-cmd:
- test --all-features
- test --no-default-features
steps:
- uses: actions/checkout@v3
- name: Enable Docker Remote API on Localhost
shell: bash
run: |
sudo mkdir -p /etc/systemd/system/docker.service.d/
sudo cp ./.github/docker.override.conf /etc/systemd/system/docker.service.d/override.conf
sudo systemctl daemon-reload
sudo systemctl restart docker
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/[email protected]
- run: cargo ${{ matrix['cargo-cmd'] }}
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: dtolnay/[email protected]
with:
components: clippy
- uses: Swatinem/[email protected]
- run: cargo clippy --all-targets -- -D warnings