tokio-messaging/.github/workflows/rust.yml
etienne-k 37d99a70c2
Reactivate the build step
This was, the test step is performed after a successful build and doesn't trigger a build on its own.
2022-11-11 11:48:10 +01:00

72 lines
1.6 KiB
YAML

name: tokio-messaging
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
CARGO_TARGET_DIR: ~/cargo-target
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Cache
uses: actions/cache@v3.0.11
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
~/cargo-target/
key: "rust-check"
- uses: actions/checkout@v3
- name: Check
run: cargo check
build:
runs-on: ubuntu-latest
needs: check
steps:
- name: Cache
uses: actions/cache@v3.0.11
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
~/cargo-target/
key: "rust-build"
- uses: actions/checkout@v3
- name: Build
run: cargo build
test:
runs-on: ubuntu-latest
needs: build
steps:
- name: Cache
uses: actions/cache@v3.0.11
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
~/cargo-target/
key: "rust-build"
- name: Install nextest
uses: taiki-e/install-action@nextest
- uses: actions/checkout@v3
# - name: Run unit tests
# run: cargo nextest run
- name: Run unit tests
uses: actions-rs/cargo@v1
with:
command: nextest
args: run --all-features --profile ci
- name: Run documentation tests
run: cargo test --doc