-
Notifications
You must be signed in to change notification settings - Fork 4
54 lines (51 loc) · 1.65 KB
/
tests.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
52
53
54
name: Build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
release:
types: [ published ]
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
env:
RUST_BACKTRACE: 1
steps:
- uses: actions/checkout@v4
- name: rust-info
run: rustc --version && cargo --version
- uses: Swatinem/rust-cache@v2
if: github.event_name != 'release' && github.event_name != 'workflow_dispatch'
- name: install varnish-dev
run: |
curl -s https://packagecloud.io/install/repositories/varnishcache/varnish75/script.deb.sh | sudo bash
sudo apt-get install -y varnish-dev
- name: test-fmt
run: cargo fmt --all -- --check
- name: build
run: cargo build --workspace --all-targets
- name: test
run: cargo test --workspace --all-targets
- name: build-all
run: cargo build --workspace --all-targets --all-features
- name: test-all
run: cargo test --workspace --all-targets --all-features
- name: test-doc
run: |
cargo test --doc
cargo doc --no-deps
- name: clippy
run: cargo clippy --workspace --all-targets
# Ensure that the docs can be built at docs.rs without varnish dependencies
test-docs-rs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: rust-info
run: rustc --version && cargo --version
- uses: Swatinem/rust-cache@v2
if: github.event_name != 'release' && github.event_name != 'workflow_dispatch'
- name: Ensure docs can be built at docs.rs without varnish dependencies
run: cargo doc --no-deps