name: "install-nix-action test" on: pull_request: push: branches: - master jobs: simple-build: strategy: matrix: os: [ubuntu-latest, macos-latest] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - name: Install Nix uses: ./ with: nix_path: nixpkgs=channel:nixos-22.11 - run: nix-env -iA cachix -f https://cachix.org/api/v1/install - run: cat /etc/nix/nix.conf # cachix should be available and be able to configure a cache - run: cachix use cachix - run: nix-build test.nix custom-nix-path: strategy: matrix: os: [ubuntu-latest, macos-latest] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - name: Install Nix uses: ./ with: nix_path: nixpkgs=channel:nixos-20.03 - run: test $NIX_PATH == "nixpkgs=channel:nixos-20.03" - run: nix-build test.nix extra-nix-config: strategy: matrix: os: [ubuntu-latest, macos-latest] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - name: Install Nix uses: ./ with: nix_path: nixpkgs=channel:nixos-22.11 extra_nix_config: | sandbox = relaxed - run: cat /etc/nix/nix.conf - run: nix-build test.nix --arg noChroot true flakes: strategy: matrix: os: [ubuntu-latest, macos-latest] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - name: Install Nix uses: ./ - run: nix flake show github:NixOS/nixpkgs installer-options: strategy: matrix: os: [ubuntu-latest, macos-latest] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - name: Install Nix uses: ./ with: nix_path: nixpkgs=channel:nixos-22.11 install_options: --tarball-url-prefix https://nixos-nix-install-tests.cachix.org/serve install_url: https://nixos-nix-install-tests.cachix.org/serve/s62m7lc0q0mz2mxxm9q0kkrcg90njzhq/install - run: nix-build test.nix oldest-supported-installer: strategy: matrix: os: [ubuntu-latest, macos-latest] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - name: Install Nix uses: ./ with: nix_path: nixpkgs=channel:nixos-22.11 install_url: https://releases.nixos.org/nix/nix-2.8.0/install - run: nix-build test.nix act-support: strategy: matrix: os: [ubuntu-latest] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - run: curl https://raw.githubusercontent.com/nektos/act/master/install.sh | sudo bash - run: docker pull ghcr.io/catthehacker/ubuntu:js-20.04 - run: ./bin/act -P ubuntu-latest=ghcr.io/catthehacker/ubuntu:js-20.04 push -j simple-build