Skip to content

static checks

static checks #3

Workflow file for this run

name: stactic checks
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
jobs:
flakecheck:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: Install Nix
uses: cachix/install-nix-action@7ac1ec25491415c381d9b62f0657c7a028df52a7 # v24
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- name: nix flake check
run: nix -L flake check
generate:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: Install Nix
uses: cachix/install-nix-action@7ac1ec25491415c381d9b62f0657c7a028df52a7 # v24
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- name: Run code generations & tidying
run: nix run .#generate
- name: Check if modifications were made
run: |
diff=$(git diff)
if [[ -n "$diff" ]]; then
cat << EOF >> "${GITHUB_STEP_SUMMARY}"
\`\`\`diff
${diff}
\`\`\`
EOF
exit 1
fi
echo "Everything is tidy and generated."