Merge pull request #400 from nelsonjchen/dependabot/cargo/either-1.9.0 #1226
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
on: [push, pull_request] | |
name: Continuous Integration | |
concurrency: | |
group: "${{ github.ref }}-ci" | |
cancel-in-progress: true | |
jobs: | |
check: | |
name: Check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- uses: Swatinem/rust-cache@v2 | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: check | |
test: | |
name: Test Suite | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- uses: Swatinem/rust-cache@v2 | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
fmt: | |
name: Rustfmt | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- run: rustup component add rustfmt | |
- uses: Swatinem/rust-cache@v2 | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check | |
clippy: | |
name: Clippy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- run: rustup component add clippy | |
- uses: Swatinem/rust-cache@v2 | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
args: -- -D warnings | |
docker: | |
name: Docker Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Build and push | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
cache-from: type=gha,scope=cached-stage | |
cache-to: type=gha,scope=cached-stage,mode=max | |
load: true |