Skip to content

Commit

Permalink
Reduce CI time
Browse files Browse the repository at this point in the history
By only running the test suite on `--all-features` and instead checking
the powerset, the amount of time taken to run the CI suite should be
significantly reduced.

Included in this commit is a trivial change to silence a lint on older
compilers.
  • Loading branch information
jhpratt committed Sep 23, 2020
1 parent e16fca6 commit b6a1213
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
22 changes: 13 additions & 9 deletions .github/workflows/build.yaml
Expand Up @@ -98,11 +98,10 @@ jobs:
override: true

- name: Install cargo-web
# uses: actions-rs/install@v0.1
# with:
# crate: cargo-web
# version: ^0.6
# use-tool-cache: true
uses: actions-rs/install@v0.1
with:
crate: cargo-web
use-tool-cache: true
run: cargo +stable install cargo-web
if: steps.cache.outputs.cache-hit != 'true'

Expand Down Expand Up @@ -187,17 +186,22 @@ jobs:
target
key: ${{ runner.os }}-cargo-${{ matrix.rust }}-${{ matrix.os }}-${{ hashFiles('**/Cargo.toml') }}2

- name: Test feature powerset (--tests)
# For speed reasons, it's worth it to just check the feature powerset and
# test with everything enabled. As features are additive, the tests ensure
# that everything works, while the checking ensures any combination would
# compile without issue.

- name: Check feature powerset
uses: actions-rs/cargo@v1
with:
command: hack
args: test --feature-powerset --optional-deps --skip default,libc,winapi,stdweb --tests
args: check --feature-powerset --optional-deps --skip default,libc,winapi,stdweb

- name: Test documentation
- name: Test (--all-features)
uses: actions-rs/cargo@v1
with:
command: test
args: --all-features --doc
args: --all-features

fmt:
name: Formatting
Expand Down
2 changes: 1 addition & 1 deletion time-macros-impl/src/error.rs
Expand Up @@ -11,8 +11,8 @@ pub(crate) enum Error {
Custom(String),
}

#[allow(clippy::use_self)]
impl fmt::Display for Error {
#[allow(clippy::use_self)]
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
Error::MissingComponent { name } => write!(f, "missing component: {}", name),
Expand Down

0 comments on commit b6a1213

Please sign in to comment.