-
Notifications
You must be signed in to change notification settings - Fork 24
59 lines (52 loc) · 1.99 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
58
59
# We use `actions-rs` for most of our actions
#
# This file is for the main tests, it is based on test.yml in the main slog repo.
# If we want to add clippy & rustfmt, they should be separate workflows.
on: [push, pull_request]
name: Cargo Test
env:
CARGO_TERM_COLOR: always
# has a history of occasional bugs (especially on old versions)
#
# the ci is free so we might as well use it ;)
CARGO_INCREMENTAL: 0
# Tested versions:
# 1. stable
# 2. nightly
# 3. Minimum Supported Rust Version (MSRV)
jobs:
test:
# Only run on PRs if the source branch is on someone else's repo
if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}
runs-on: ubuntu-latest
strategy:
fail-fast: false # Even if one job fails we still want to see the other ones
matrix:
# 1.59 is MSRV
rust: [1.59, stable, nightly]
# NOTE: Features to test must be specified manually. They are applied to all versions separately.
#
# This has the advantage of being more flexibile and thorough
# This has the disadvantage of being more vebrose
#
# Specific feature combos can be overridden per-version with 'include' and 'ecclude'
features: ["", "nested-values", "dynamic-keys", "nested-values dynamic-keys"]
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true
- name: Check
# A failing `cargo check` always ends the build
run: |
cargo check --verbose --features "${{ matrix.features }}"
# A failing `cargo check` always fails the build
continue-on-error: false
- name: Test
run: |
cargo test --verbose --features "${{ matrix.features }}"
# NOTE: Upstream slog has a hack here for continue-on-error
#
# We don't appear to need it.
# continue-on-error: ${{ matrix.features == '' }}