CI #434
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
# Availability-related actions. | |
name: CI | |
on: | |
push: | |
paths: | |
- "**.rs" | |
- "**.yaml" | |
- "**.yml" | |
- "**.toml" | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
schedule: | |
- cron: '0 0 * * 0' # Sunday | |
jobs: | |
# Depends on all actions that are required for a "successful" CI run. | |
ci: | |
name: CI | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-ci-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
${{ runner.os }}-cargo-ci-${{ env.cache-name }}- | |
${{ runner.os }}-cargo-ci- | |
- name: Check | |
uses: actions-rs/cargo@v1 | |
with: | |
command: check | |
args: --all-features --workspace --exclude sentinel-envoy-module --exclude ebpf-probes --exclude ebpf-userspace | |
- name: Unit Tests | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --all-features --workspace --exclude sentinel-envoy-module --exclude ebpf-probes --exclude ebpf-userspace -- --nocapture | |
- name: Ignored Unit Tests | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --all-features --workspace --exclude sentinel-envoy-module --exclude ebpf-probes --exclude ebpf-userspace -- --ignored --test-threads=1 --nocapture |