2023-07-14 17:02:58 +00:00
|
|
|
name: Lint
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- develop
|
|
|
|
pull_request:
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
clippy:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-09-15 18:30:18 +00:00
|
|
|
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
|
2023-07-14 17:02:58 +00:00
|
|
|
|
|
|
|
- name: Get nightly version to use
|
|
|
|
id: nightly
|
|
|
|
run: echo "version=$(cat .github/nightly-version)" >> $GITHUB_OUTPUT
|
|
|
|
|
|
|
|
- name: Build Dependencies
|
|
|
|
uses: ./.github/actions/build-dependencies
|
|
|
|
with:
|
|
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
2023-11-20 07:31:22 +00:00
|
|
|
|
|
|
|
- name: Install nightly rust
|
|
|
|
run: rustup toolchain install ${{ steps.nightly.outputs.version }} --profile minimal -t wasm32-unknown-unknown -c clippy
|
2023-07-14 17:02:58 +00:00
|
|
|
|
|
|
|
- name: Run Clippy
|
2023-11-20 07:31:22 +00:00
|
|
|
run: cargo +${{ steps.nightly.outputs.version }} clippy --all-features --all-targets -- -D warnings -A clippy::items_after_test_module
|
2023-07-14 17:02:58 +00:00
|
|
|
|
|
|
|
deny:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-09-15 18:30:18 +00:00
|
|
|
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
|
2023-07-14 17:02:58 +00:00
|
|
|
|
|
|
|
- name: Advisory Cache
|
2023-09-15 18:30:18 +00:00
|
|
|
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84
|
2023-07-14 17:02:58 +00:00
|
|
|
with:
|
|
|
|
path: ~/.cargo/advisory-db
|
|
|
|
key: rust-advisory-db
|
|
|
|
|
|
|
|
- name: Install cargo deny
|
|
|
|
run: cargo install --locked cargo-deny
|
|
|
|
|
|
|
|
- name: Run cargo deny
|
|
|
|
run: cargo deny -L error --all-features check
|
|
|
|
|
|
|
|
fmt:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-09-15 18:30:18 +00:00
|
|
|
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
|
2023-07-14 17:02:58 +00:00
|
|
|
|
|
|
|
- name: Get nightly version to use
|
|
|
|
id: nightly
|
|
|
|
run: echo "version=$(cat .github/nightly-version)" >> $GITHUB_OUTPUT
|
|
|
|
|
2023-11-20 07:31:22 +00:00
|
|
|
- name: Install nightly rust
|
|
|
|
run: rustup toolchain install ${{ steps.nightly.outputs.version }} --profile minimal -c rustfmt
|
2023-07-14 17:02:58 +00:00
|
|
|
|
|
|
|
- name: Run rustfmt
|
|
|
|
run: cargo +${{ steps.nightly.outputs.version }} fmt -- --check
|
2023-11-13 04:55:15 +00:00
|
|
|
|
|
|
|
dockerfiles:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
|
|
|
|
- name: Verify Dockerfiles are up to date
|
|
|
|
# Runs the file which generates them and checks the diff has no lines
|
|
|
|
run: cd orchestration && ./dockerfiles.sh && git diff | wc -l | grep -x "0"
|