Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,36 @@ permissions:
contents: read

jobs:
formatting:
name: Formatting
runs-on: ${{ matrix.architecture }}
strategy:
matrix:
architecture: [ubuntu-24.04, ubuntu-24.04-arm]
language: [shell]
steps:
- name: Checkout code.
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Setup Nix.
uses: cachix/install-nix-action@4e002c8ec80594ecd40e759629461e26c8abed15 # v31.9.0
- name: Check formatting.
run: nix develop -c make check-${{ matrix.language }}-formatting

linting:
name: Linting
runs-on: ${{ matrix.architecture }}
strategy:
matrix:
architecture: [ubuntu-24.04, ubuntu-24.04-arm]
language: [shell]
steps:
- name: Checkout code.
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Setup Nix.
uses: cachix/install-nix-action@4e002c8ec80594ecd40e759629461e26c8abed15 # v31.9.0
- name: Check linting.
run: nix develop -c make check-${{ matrix.language }}-linting

scripts-permissions:
name: Scripts Permissions
runs-on: ${{ matrix.architecture }}
Expand Down
12 changes: 12 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,18 @@
default:
echo "Default target."

.PHONY: check-shell-formatting
check-shell-formatting:
shfmt --simplify --diff ci/* rust/ci/*

.PHONY: check-yaml-formatting
check-yaml-formatting:
yamlfmt -verbose -lint -dstar .github/workflows/*

.PHONY: fix-shell-formatting
fix-shell-formatting:
shfmt --simplify --write ci/* rust/ci/*

.PHONY: fix-yaml-formatting
fix-yaml-formatting:
yamlfmt -verbose -dstar .github/workflows/*
Expand All @@ -14,6 +22,10 @@ fix-yaml-formatting:
check-github-actions-workflows-linting:
actionlint -verbose -color

.PHONY: check-shell-linting
check-shell-linting:
shellcheck ci/*.sh rust/ci/*.sh

.PHONY: check-scripts-permissions
check-scripts-permissions:
./ci/check-scripts-permissions.sh
3 changes: 3 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
hardeningDisable = [ "all" ];

buildInputs = [
# Shell scripts.
pkgs.shfmt
pkgs.shellcheck
# GitHub Action Workflows.
pkgs.yamlfmt
pkgs.actionlint
Expand Down