Files
concrete/.github/workflows/rust.yml
2022-03-03 16:32:10 +01:00

61 lines
1.3 KiB
YAML

name: Continuous integration
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
CARGO_TERM_COLOR: always
jobs:
all:
runs-on: ubuntu-20.04
env:
CARGO_ARGS: --release
steps:
- name: Code checkout
uses: actions/checkout@v2
- name: Rust install
uses: actions-rs/toolchain@v1
with:
toolchain: stable
# A SSH private key is required as some dependencies are from private repos
- uses: webfactory/ssh-agent@v0.5.2
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY2 }}
- name: cargo check
uses: actions-rs/cargo@v1
with:
command: check
args: ${{ env.CARGO_ARGS }}
- name: cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check
- name: cargo build
uses: actions-rs/cargo@v1
env:
RUSTFLAGS: -D warnings
with:
command: build
args: ${{ env.CARGO_ARGS }}
- name: cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: ${{ env.CARGO_ARGS }} -- -D warnings
- name: cargo test
uses: actions-rs/cargo@v1
with:
command: test
args: ${{ env.CARGO_ARGS }} --no-fail-fast