add a build and push to quay job #2
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: Cargo lint and test | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
jobs: | |
lint: | |
name: Run linters | |
runs-on: | |
- self-hosted | |
- dind | |
- small | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install system dependencies | |
run: | | |
set -xe | |
sudo apt-get update | |
sudo apt-get install -y pkg-config libssl-dev | |
- name: Install rust toolchain with clippy and rustfmt | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
components: rustfmt, clippy | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
prefix-key: "${{ matrix.name }}-lint" | |
workspaces: | | |
${{ matrix.path }} | |
- name: Cargo format and clippy | |
run: | | |
set -xe | |
cargo --version | |
cargo fmt --all --check | |
cargo clippy |