Skip to content

Split services into option parts so we can have runners #407

Split services into option parts so we can have runners

Split services into option parts so we can have runners #407

Workflow file for this run

# SPDX-FileCopyrightText: Andrew Hayzen <[email protected]>
#
# SPDX-License-Identifier: MPL-2.0
name: check
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
license-check:
runs-on: ubuntu-22.04
steps:
- uses: actions/[email protected]
- name: REUSE Compliance Check
uses: fsfe/reuse-action@v3
flake-checker:
runs-on: ubuntu-22.04
steps:
- uses: actions/[email protected]
- uses: DeterminateSystems/flake-checker-action@v8
nix-fmt:
runs-on: ubuntu-22.04
steps:
- uses: actions/[email protected]
- uses: DeterminateSystems/nix-installer-action@v12
- uses: DeterminateSystems/magic-nix-cache-action@v7
- name: nix fmt
run: nix fmt
- name: git diff
run: git diff --exit-code
shellcheck:
runs-on: ubuntu-22.04
steps:
- uses: actions/[email protected]
# Shellcheck should already be installed on github runners
- name: install shellcheck
run: sudo apt install --yes shellcheck
- name: shellcheck
run: shellcheck scripts/*.sh
nix-flake-check-no-build:
# Run after pre checks
needs: [license-check, flake-checker, nix-fmt, shellcheck]
runs-on: ubuntu-22.04
steps:
- uses: actions/[email protected]
- uses: DeterminateSystems/nix-installer-action@v12
- uses: DeterminateSystems/magic-nix-cache-action@v7
- name: nix flake check
# Only run a check of the flake itself without building
run: nix flake --option sandbox false check --no-build --print-build-logs
nix-flake-check-lab-actual:
# Run after flake check
needs: [nix-flake-check-no-build]
runs-on: ubuntu-22.04
steps:
- uses: actions/[email protected]
- uses: DeterminateSystems/nix-installer-action@v12
- uses: DeterminateSystems/magic-nix-cache-action@v7
- name: nix build
# nix flake check doesn't have a way to specify a specific test to run
# https://github.com/NixOS/nix/issues/8881
run: nix build --option sandbox false --print-build-logs .#checks.x86_64-linux.lab-actual-test
nix-flake-check-lab-bitwarden:
# Run after flake check
needs: [nix-flake-check-no-build]
runs-on: ubuntu-22.04
steps:
- uses: actions/[email protected]
- uses: DeterminateSystems/nix-installer-action@v12
- uses: DeterminateSystems/magic-nix-cache-action@v7
- name: nix build
# nix flake check doesn't have a way to specify a specific test to run
# https://github.com/NixOS/nix/issues/8881
run: nix build --option sandbox false --print-build-logs .#checks.x86_64-linux.lab-actual-test
nix-flake-check-vps-wagtail:
# Run after flake check
needs: [nix-flake-check-no-build]
runs-on: ubuntu-22.04
steps:
- uses: actions/[email protected]
- uses: DeterminateSystems/nix-installer-action@v12
- uses: DeterminateSystems/magic-nix-cache-action@v7
- name: nix build
# nix flake check doesn't have a way to specify a specific test to run
# https://github.com/NixOS/nix/issues/8881
run: nix build --option sandbox false --print-build-logs .#checks.x86_64-linux.vps-wagtail-test