-
Notifications
You must be signed in to change notification settings - Fork 4
67 lines (63 loc) · 1.84 KB
/
test.yml
File metadata and controls
67 lines (63 loc) · 1.84 KB
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
67
name: Test Suite
on:
pull_request:
merge_group:
types: [checks_requested]
push:
branches:
- main
concurrency:
# For pull requests, cancel running workflows, for main, run all
#
# `github.event.number` exists for pull requests, otherwise fall back to SHA
# for main
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
cancel-in-progress: true
env:
RUST_BACKTRACE: full
VERBOSE: true
CI: true
PROFILE: debug
# Error on warnings (https://doc.rust-lang.org/rustc/lints/groups.html)
RUSTFLAGS: "-D warnings"
jobs:
sds:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- name: "Rust checks"
run: bash ./scripts/rust_checks.sh
- name: "Rust tests"
run: make test-rust
sds-go:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: source "$HOME/.cargo/env"
- name: "Build the SDS Go/Rust wrapper"
run: make build-sds-go
- name: "Run the Go linter"
run: |
cd sds-go/go
go version
go install honnef.co/go/tools/cmd/staticcheck@latest
export PATH=$PATH:$(go env GOPATH)/bin
LD_LIBRARY_PATH=../../sds/target/release staticcheck ./...
cd ../..
make format-go
- name: "Run the Go unit tests"
working-directory: sds-go/go
run: LD_LIBRARY_PATH=../../sds/target/release go test -v .
- name: "Make sure the example builds and stays relevant"
working-directory: sds-go/go
run: |
go build -buildvcs=false
license-3rdparty:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "Install dd-rust-license-tool"
run: cargo install dd-rust-license-tool
- name: "Check LICENSE-3rdparty.csv"
run: make check-licenses