mirror of
https://github.com/DeterminateSystems/nix-installer-action.git
synced 2024-12-23 13:32:06 +01:00
Add expected Nix versions
This commit is contained in:
parent
5385bea1cb
commit
0e85ec287f
1 changed files with 15 additions and 8 deletions
23
.github/workflows/ci.yml
vendored
23
.github/workflows/ci.yml
vendored
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue