Skip to content

image/config: Add helpers for config and annotations (labels) #315

image/config: Add helpers for config and annotations (labels)

image/config: Add helpers for config and annotations (labels) #315

Workflow file for this run

name: ci
on:
pull_request: {}
push:
branches:
- main
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Generate lockfile
run: cargo generate-lockfile
- name: Setup Cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: cargo build --all-features
doc:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Generate lockfile
run: cargo generate-lockfile
- name: Setup Cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-doc-${{ hashFiles('**/Cargo.lock') }}
- run: cargo doc --all-features --no-deps
lint-clippy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Generate lockfile
run: cargo generate-lockfile
- name: Setup Cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-clippy-${{ hashFiles('**/Cargo.lock') }}
- name: Clippy Lint
run: cargo clippy --all --all-features -- -D warnings
lint-rustfmt:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Rustfmt
run: cargo fmt && git diff --exit-code
test-unit:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Select Nighly Toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
- name: Install rustfmt
shell: bash
run: rustup component add rustfmt
- name: Unit tests with all features
uses: actions-rs/cargo@v1
with:
command: test
args: --all-features --no-fail-fast
env:
CARGO_INCREMENTAL: '0'
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests'
RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests'
- name: Unit tests with default features
uses: actions-rs/cargo@v1
with:
command: test
args: --no-fail-fast
env:
CARGO_INCREMENTAL: '0'
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests'
RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests'
- name: Coverage
uses: actions-rs/[email protected]
with:
config: .github/grcov.yml
- name: Upload Results
uses: codecov/codecov-action@v2