Repository navigation
42 lines (39 loc) · 1.43 KB
/
Copy pathtest.yml
File metadata and controls
42 lines (39 loc) · 1.43 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
name: Reporter checks
on:
pull_request:
push:
workflow_dispatch:
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Install Rust
run: rustup toolchain install 1.99.0 --profile minimal --component rustfmt --component clippy
- name: Check formatting
run: cargo +1.99.0 fmt --manifest-path reporter/Cargo.toml --check
- name: Check Clippy
run: cargo +1.99.0 clippy --manifest-path reporter/Cargo.toml --locked --all-targets -- -D warnings
- name: Test Unix-socket reporting and shutdown
run: cargo +1.99.0 test --manifest-path reporter/Cargo.toml --locked
- name: Validate Compose
run: docker compose config --quiet
- name: Build Tailscale image
run: docker compose build tailscale
image:
runs-on: ubuntu-latest
strategy:
matrix:
platform: [linux/amd64, linux/arm64]
steps:
- uses: actions/checkout@v7
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- name: Build reporter image
run: docker buildx build --platform "${{ matrix.platform }}" --load -t tailscale-reporter:test reporter
- name: Verify static executable starts
run: |
output=$(docker run --rm -e DAPPMANAGER_URL=invalid tailscale-reporter:test 2>&1) && exit 1
printf '%s\n' "$output" | grep -Fx 'invalid DAPPMANAGER_URL'