-
Notifications
You must be signed in to change notification settings - Fork 9
51 lines (39 loc) · 1.15 KB
/
main.yaml
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
name: CI
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
rust_lint:
strategy:
fail-fast: true
matrix:
include:
- rust_version: "stable"
- rust_version: "nightly"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Rust ${{ matrix.rust_version }}
run: |
rustup override set ${{ matrix.rust_version }}
rustup update ${{ matrix.rust_version }}
rustup component add rustfmt clippy
- name: Check fmt
if: matrix.rust_version == 'stable'
run: cargo fmt -- --check
- name: Check clippy
if: matrix.rust_version == 'nightly'
run: cargo clippy -- -D warnings
rust_integ:
runs-on: ubuntu-latest
steps:
- name: Install packages
run: sudo apt-get -y install dnsmasq
- uses: actions/checkout@v3
- name: Install Rust stable
run: rustup default stable
- name: Run test
env:
# Needed for the `link::test::create_get_delete_w` test to pass.
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER: "sudo -E"
run: cargo test -- --test-threads=1 --show-output