mirror of
https://github.com/serokell/deploy-rs.git
synced 2024-09-11 10:45:29 +03:00
a928352641
Problem: Currently, the only way to test deploy-rs deployments is to actually do a deployment to an existing NixOS instance (either in VM, or a real machine) manually. This is a bit inconvenient and one can forget to test changes when developing/reviewing deploy-rs changes. Solution: Add NixOS VM tests.
28 lines
752 B
YAML
28 lines
752 B
YAML
name: Nix flake check
|
|
on: pull_request
|
|
|
|
jobs:
|
|
get-matrix:
|
|
runs-on: [self-hosted, nix]
|
|
outputs:
|
|
check-matrix: ${{ steps.set-check-matrix.outputs.matrix }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- id: set-check-matrix
|
|
run: echo "matrix=$(nix eval --json .#check-matrix.x86_64-linux)" >> $GITHUB_OUTPUT
|
|
|
|
check:
|
|
needs: get-matrix
|
|
name: check ${{ matrix.check }}
|
|
runs-on: [self-hosted, nix]
|
|
strategy:
|
|
fail-fast: false
|
|
# this matrix consists of the names of all checks defined in flake.nix
|
|
matrix: ${{fromJson(needs.get-matrix.outputs.check-matrix)}}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: check
|
|
run: nix build -L .#checks.x86_64-linux.${{ matrix.check }}
|