[ci] Add workflow #13
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened, ready_for_review] | |
# Disable previous runs | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
# ${{ vars.CI_UNIFIED_IMAGE }} is defined in the repository variables | |
jobs: | |
check: | |
name: "check" | |
runs-on: ubuntu-latest | |
container: | |
image: ${{ vars.CI_IMAGE }} | |
steps: | |
- uses: actions/checkout@v3 | |
# uncomment if needed | |
# - name: fmt | |
# run: | | |
# cargo fmt --all --check | |
- name: Rust Cache | |
uses: Swatinem/[email protected] | |
with: | |
cache-on-failure: true | |
cache-all-crates: true | |
- name: check | |
run: cargo check | |
test: | |
name: "test" | |
runs-on: ubuntu-latest | |
container: | |
image: ${{ vars.CI_IMAGE }} | |
steps: | |
- uses: actions/checkout@v3 | |
# - name: Install Rust stable toolchain | |
# uses: actions-rs/[email protected] | |
# with: | |
# profile: minimal | |
# toolchain: 1.75.0 | |
# override: true | |
- name: Rust Cache | |
uses: Swatinem/[email protected] | |
with: | |
cache-on-failure: true | |
cache-all-crates: true | |
- name: test | |
run: | | |
# sudo apt-get update && sudo apt-get install -y iproute2 protobuf-compiler | |
sudo apt-get update && sudo apt-get install -y iproute2 | |
ip a | |
ip link set lo up | |
cargo test | |
doc: | |
name: "doc" | |
runs-on: ubuntu-latest | |
container: | |
image: ${{ vars.CI_IMAGE }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Rust Cache | |
uses: Swatinem/[email protected] | |
with: | |
cache-on-failure: true | |
cache-all-crates: true | |
- name: doc | |
run: cargo doc | |
clippy: | |
name: "clippy" | |
runs-on: ubuntu-latest | |
container: | |
image: ${{ vars.CI_IMAGE }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Rust Cache | |
uses: Swatinem/[email protected] | |
with: | |
cache-on-failure: true | |
cache-all-crates: true | |
- name: clippy | |
continue-on-error: true | |
run: cargo clippy |