Simplified greenboot health-check #94
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
on: | |
push: | |
branches: | |
- greenboot-rs | |
pull_request: | |
name: Continuous integration | |
jobs: | |
check-spelling: | |
name: Check spelling | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Check spelling | |
uses: codespell-project/actions-codespell@master | |
with: | |
builtin: clear,rare,usage,code,en-GB_to_en-US | |
check_filenames: true | |
check_hidden: true | |
ignore_words_file: .github/spellcheck-ignore | |
skip: "./docs/Gemfile.lock,./docs/_config.yml,./.github,./.git,./greenboot.spec,./dist" | |
fmt: | |
name: Cargo fmt | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --check --all | |
clippy: | |
name: Clippy | |
runs-on: ubuntu-latest | |
container: fedora:latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-clippy-${{ hashFiles('**/Cargo.lock') }} | |
- name: Install deps | |
run: | | |
dnf install -y make gcc git clippy cargo rust | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
args: -- -D warnings -D clippy::panic -D clippy::todo | |
build_and_test: | |
runs-on: ubuntu-latest | |
container: | |
image: fedora:latest | |
options: --user root | |
steps: | |
- name: Install deps | |
run: | | |
dnf install -y make gcc git cargo rust git grub2-efi grub2-efi-modules shim | |
- uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
- name: Fix git trust | |
run: git config --global --add safe.directory /__w/greenboot-rs/greenboot-rs | |
- name: Cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Build | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
- name: Run tests | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: -- --test-threads=1 | |