Add expected Nix versions

This commit is contained in:
Luc Perkins 2024-05-16 20:49:32 -03:00
parent 5385bea1cb
commit 0e85ec287f
No known key found for this signature in database
GPG key ID: 16DB1108FB591835

View file

@ -212,18 +212,25 @@ jobs:
duration: 5m duration: 5m
authorized-users: grahamc authorized-users: grahamc
install-with-non-default-inputs: install-with-non-default-source-url:
name: Install Nix using non-default Action inputs name: Install Nix using non-default source-url inputs
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
strategy: strategy:
matrix: matrix:
version: versions:
- "0.12.0" - { nix-installer: "0.12.0", nix: "2.20.0" }
- "0.14.0" - { nix-installer: "0.14.0", nix: "2.20.0" }
- "0.19.0" - { nix-installer: "0.18.0", nix: "2.20.0" }
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main - uses: DeterminateSystems/nix-installer-action@main
with: with:
source-url: https://github.com/DeterminateSystems/nix-installer/releases/download/v${{ matrix.version }}/nix-installer-x86_64-linux source-url: https://github.com/DeterminateSystems/nix-installer/releases/download/v${{ matrix.versions.nix-installer }}/nix-installer-x86_64-linux
- run: nix --version - run: |
NIX_VERSION_OUTPUT=$(nix --version)
NIX_VERSION=$(echo "{NIX_VERSION}" | awk '{print $NF}')
EXPECTED_OUTPUT="nix (Nix) ${{ matrix.versions.nix }}"
if [ "${NIX_VERSION_OUTPUT}" != "${EXPECTED_OUTPUT}" ]; then
echo "Nix version ${NIX_VERSION} didn't match expected version ${{ matrix.versions.nix }}"
exit 1
fi