mirror of
https://github.com/Drop-OSS/libtailscale-drop.git
synced 2026-02-04 06:51:18 +01:00
52 lines
981 B
YAML
52 lines
981 B
YAML
name: Tests
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- rust
|
|
pull_request:
|
|
|
|
env:
|
|
RUSTFLAGS: -Dwarnings
|
|
CARGO_NET_RETRY: 10
|
|
CI: 1
|
|
RUST_BACKTRACE: short
|
|
RUSTUP_MAX_RETRIES: 10
|
|
|
|
jobs:
|
|
build_and_test:
|
|
name: Build and test
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@master
|
|
- uses: actions/setup-go@v3
|
|
with:
|
|
go-version: '>=1.20.0'
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
- uses: Swatinem/rust-cache@v2
|
|
|
|
- name: check
|
|
run: cargo check --all
|
|
|
|
- name: tests
|
|
run: cargo test --all
|
|
|
|
check_fmt_and_docs:
|
|
name: Checking fmt and docs
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@master
|
|
- uses: actions/setup-go@v3
|
|
with:
|
|
go-version: '>=1.20.0'
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
components: rustfmt, clippy
|
|
- uses: Swatinem/rust-cache@v2
|
|
|
|
- name: fmt
|
|
run: cargo fmt --all -- --check
|
|
|
|
- name: Docs
|
|
run: cargo doc --no-deps
|