mirror of
https://old.git.ood.ovh/nehu/tokio-messaging.git
synced 2025-04-28 23:27:54 +02:00
75 lines
1.5 KiB
YAML
75 lines
1.5 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:
|
|
- uses: actions/checkout@v3
|
|
- name: Cache
|
|
uses: Swatinem/rust-cache@v2
|
|
with:
|
|
shared-key: "rust"
|
|
key: "check"
|
|
- name: Check
|
|
run: cargo check
|
|
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
needs: check
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Cache
|
|
uses: Swatinem/rust-cache@v2
|
|
with:
|
|
shared-key: "rust"
|
|
key: "build"
|
|
- name: Build
|
|
run: cargo build
|
|
|
|
unit-tests:
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Cache
|
|
uses: Swatinem/rust-cache@v2
|
|
with:
|
|
shared-key: "rust"
|
|
key: "build"
|
|
- name: Install nextest
|
|
uses: taiki-e/install-action@nextest
|
|
- name: Run unit tests
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: nextest
|
|
args: run --all-features --profile ci
|
|
- name: Process unit test report
|
|
uses: dorny/test-reporter@v1
|
|
if: success() || failure()
|
|
with:
|
|
name: test-results
|
|
path: target/nextest/ci/junit.xml
|
|
reporter: java-junit
|
|
|
|
doc-tests:
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Cache
|
|
uses: Swatinem/rust-cache@v2
|
|
with:
|
|
shared-key: "rust"
|
|
key: "build"
|
|
- name: Run documentation tests
|
|
run: cargo test --doc
|