-
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (54 loc) · 1.78 KB
/
test.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
name: Continuous tests
on:
push:
branches-ignore:
- master
jobs:
clippy:
if: "!contains(github.event.head_commit.message, 'skip ci')"
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: target/
key: cargo-clippy-cache-${{ matrix.arch.target }}
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2024-12-31
override: true
components: clippy
- uses: actions-rs/cargo@v1
with:
command: clippy
test:
if: "!contains(github.event.head_commit.message, 'skip ci')"
strategy:
matrix:
arch:
- { name: "x86_64", os: "ubuntu-20.04", target: "x86_64-unknown-linux-gnu", cross: false }
runs-on: ${{ matrix.arch.os }}
services:
mysql:
image: mysql:5.7
env:
MYSQL_ROOT_PASSWORD: ${{ secrets.MYSQL_ROOT_PASSWORD }}
ports:
- 3306:3306
steps:
- name: Install dependencies
run: sudo apt install -y libcap-dev libjq-dev libonig-dev
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: target/
key: cargo-test-cache-${{ matrix.arch.target }}
- name: Create necessary directories
run: |
mkdir dist/
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2024-12-31
override: true
- name: Test suite
run: sudo capsh --caps='cap_net_raw+eip cap_setpcap,cap_setuid,cap_setgid+ep' --keep=1 --user=runner --addamb=cap_net_raw -- -c "PATH=$PATH HOME=/home/runner JQ_LIB_DIR=/usr/lib/x86_64-linux-gnu DSN=mysql://root:${{ secrets.MYSQL_ROOT_PASSWORD }}@127.0.0.1/information_schema?ssl-mode=DISABLED cargo test --all-features"