This repository was archived by the owner on May 22, 2024. It is now read-only.
Update deps, adapt to newer versions, fix clippy #98
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: Build and Test | |
on: | |
push: | |
branches: | |
- main | |
pull_request: {} | |
jobs: | |
cargo-deny: | |
name: Run cargo deny | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
checks: | |
- advisories | |
- bans licenses sources | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: EmbarkStudios/cargo-deny-action@v1 | |
with: | |
command: check ${{ matrix.checks }} | |
ui_test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install toolchain nightly | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
default: true | |
- name: UI Test with toolchain nightly | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --test ui --features "derive" | |
build_and_test: | |
runs-on: ${{ matrix.config.os }} | |
strategy: | |
# report each failing OS/toolchain build - useful for separating between OS failures vs. toolchain (nightly) failures | |
fail-fast: false | |
matrix: | |
config: | |
- os: ubuntu-latest | |
features: default | |
- os: macos-latest | |
features: default | |
- os: windows-latest | |
features: rustls-tls | |
toolchain: | |
- stable | |
features: | |
- "derive" | |
- "derive-admission-webhook" | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install toolchain ${{ matrix.toolchain }} | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
default: true | |
components: clippy, rustfmt | |
- name: Build with toolchain ${{ matrix.toolchain }} | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --release --no-default-features --features "${{ matrix.features }} ${{ matrix.config.features }}" | |
- name: Test with toolchain ${{ matrix.toolchain }} | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --workspace --lib --no-default-features --features "${{ matrix.features }} ${{ matrix.config.features }}" | |
- name: Test admission derive with toolchain ${{ matrix.toolchain }} | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --package krator-derive --test admission --features "admission-webhook" | |
- name: Test docs with toolchain ${{ matrix.toolchain }} | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --doc --all --no-default-features --features "${{ matrix.features }} ${{ matrix.config.features }}" | |
- name: Check formatting | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check | |
- name: Clippy | |
uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
args: --workspace --no-default-features --features "${{ matrix.features }} ${{ matrix.config.features }}" |