Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): test workflow embetterments #2176

Merged
merged 17 commits into from Jun 23, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions .config/nextest.toml
@@ -0,0 +1,8 @@
# recommended nextest profile for CI jobs (from
# https://nexte.st/book/configuration.html#profiles)
[profile.ci]
# Print out output for failing tests as soon as they fail, and also at the end
# of the run (for easy scrollability).
failure-output = "immediate-final"
# Do not cancel the test run on the first failure.
fail-fast = false
36 changes: 33 additions & 3 deletions .github/workflows/test_wasm.yml → .github/workflows/test.yml
@@ -1,4 +1,4 @@
name: Tests (WASM)
name: Tests

on:
push:
Expand Down Expand Up @@ -29,6 +29,36 @@ env:
RUST_BACKTRACE: short

jobs:
test:
# Test against stable Rust across macOS, Windows, and Linux, and against
# beta and nightly rust on Ubuntu.
name: cargo test (${{ matrix.rust }} on ${{ matrix.os }})
strategy:
matrix:
# test all Rust versions on ubuntu-latest
os: [ubuntu-latest]
rust: [stable, beta, nightly]
# test stable Rust on Windows and MacOS as well
include:
- rust: stable
os: windows-latest
- rust: stable
os: macos-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@main
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
profile: minimal
override: true
- name: install cargo-nextest
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

heck yeah

uses: taiki-e/install-action@nextest
- name: Run tests
run: cargo nextest run --profile ci --workspace --all-features
- name: Run doctests
run: cargo test --doc --workspace --all-features

test-build-wasm:
runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -75,6 +105,6 @@ jobs:
toolchain: stable
override: true
- name: install test runner for wasm
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
uses: taiki-e/install-action@wasm-pack
- name: run wasm tests
run: cd ${{ matrix.subcrate }} && wasm-pack test --node
run: cd ${{ matrix.subcrate }} && wasm-pack test --node
48 changes: 0 additions & 48 deletions .github/workflows/test_os.yml

This file was deleted.

50 changes: 0 additions & 50 deletions .github/workflows/test_versions.yml

This file was deleted.