Skip to content

Commit

Permalink
Split trybuild tests out to own job
Browse files Browse the repository at this point in the history
  • Loading branch information
TedDriggs committed Oct 26, 2022
1 parent 45cf09a commit 5cf5f0a
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 2 deletions.
1 change: 0 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ jobs:
- beta
- stable
- 1.40.0 # MSRV
- 1.59.0 # Used for trybuild; supports aarch64
features:
- ""
- --no-default-features
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/compiletests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Compile Test

on: [push, pull_request]

jobs:
compiletest:
runs-on: ubuntu-latest

env:
RUST_BACKTRACE: 1
RUSTFLAGS: "--cfg compiletests"

steps:
- uses: actions/checkout@v2

- uses: actions-rs/toolchain@v1
with:
toolchain: 1.59.0
override: true

- name: main crate
run: |
cd derive_builder
cargo build --verbose
cargo test --no-fail-fast --verbose -- --nocapture
cargo doc
4 changes: 3 additions & 1 deletion derive_builder/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ derive_builder_macro = { version = "=0.11.2", path = "../derive_builder_macro" }
[dev-dependencies]
pretty_assertions = "0.6.1"
rustversion = "1.0.4"
trybuild = "1.0.38"
serde = { version = "1", features = ["derive"] }
serde_json = "1"

[target.'cfg(compiletests)'.dev-dependencies]
trybuild = "1.0.38"
2 changes: 2 additions & 0 deletions derive_builder/tests/compiletests.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![cfg(compiletests)]

extern crate rustversion;
extern crate trybuild;

Expand Down

0 comments on commit 5cf5f0a

Please sign in to comment.