mirror of
https://old.git.ood.ovh/nehu/tokio-messaging.git
synced 2025-04-28 22:27:04 +02:00
Add a simple GH actions workflow
This commit is contained in:
parent
f454bb04e4
commit
7390946e9e
1 changed files with 64 additions and 0 deletions
64
.github/workflows/rust.yml
vendored
Normal file
64
.github/workflows/rust.yml
vendored
Normal file
|
@ -0,0 +1,64 @@
|
|||
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"
|
||||
# TODO: not needed for now
|
||||
# - 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"
|
||||
- uses: actions/checkout@v3
|
||||
- name: Run unit tests
|
||||
run: cargo test
|
Loading…
Add table
Reference in a new issue