From a3f4c15c4900a749adb87c7a3005946ffb348a15 Mon Sep 17 00:00:00 2001 From: Cole Helbling Date: Wed, 29 May 2024 12:40:51 -0700 Subject: [PATCH] bogus: simulate failure on one job not all --- .github/workflows/ci.yml | 180 +-------------------------------------- 1 file changed, 4 insertions(+), 176 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e3eaa48..5d28273 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,23 +26,7 @@ jobs: name: Check the dist/ folder is up to date runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v4 - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - name: pnpm install - run: nix develop --command pnpm install - - name: prettier format - run: nix develop --command pnpm run check-fmt - - name: ESLint - run: nix develop --command pnpm run lint - - name: tsup build - run: nix develop --command pnpm run build - - name: ncc package - run: nix develop --command pnpm run package - - name: Git status - run: git status --porcelain=v1 - - name: Ensure no staged changes - run: git diff --exit-code + - run: exit 1 install-nix-linux: name: Run test suite for Linux systems @@ -57,83 +41,7 @@ jobs: contents: read id-token: write steps: - - uses: actions/checkout@v4 - - name: Install Nix - uses: ./ - with: - logger: pretty - log-directives: nix_installer=trace - backtrace: full - _internal-strict-mode: true - - name: echo $PATH - run: echo $PATH - - - name: Render the devshell - if: success() || failure() - run: | - nix develop --command date - - - name: Test `nix` with `$GITHUB_PATH` - if: success() || failure() - run: | - nix run nixpkgs#hello - nix profile install nixpkgs#hello - hello - nix store gc - nix run nixpkgs#hello - - - name: Test bash - run: nix-instantiate -E 'builtins.currentTime' --eval - if: success() || failure() - shell: bash --login {0} - - name: Test sh - run: nix-instantiate -E 'builtins.currentTime' --eval - if: success() || failure() - shell: sh -l {0} - - name: Install Nix again (noop) - uses: ./ - with: - logger: pretty - log-directives: nix_installer=trace - backtrace: full - _internal-strict-mode: true - - name: Test `nix` with `$GITHUB_PATH` - if: success() || failure() - run: | - nix run nixpkgs#hello - nix profile install nixpkgs#hello - hello - nix store gc - nix run nixpkgs#hello - - name: Reinstall Nix - uses: ./ - with: - logger: pretty - log-directives: nix_installer=trace - backtrace: full - reinstall: true - extra-conf: | - use-sqlite-wal = true - _internal-strict-mode: true - - name: Test `nix` with `$GITHUB_PATH` - if: success() || failure() - run: | - nix run nixpkgs#hello - nix profile install nixpkgs#hello - hello - nix store gc - nix run nixpkgs#hello - - name: Verify the generated nix.conf - run: | - cat -n /etc/nix/nix.conf - grep -E "^trusted-users = .*$USER" /etc/nix/nix.conf - grep -E "^use-sqlite-wal = true" /etc/nix/nix.conf - - name: Breakpoint if tests failed - if: failure() - uses: namespacelabs/breakpoint-action@v0 - with: - duration: 5m - authorized-users: grahamc + - run: exit 0 install-nix-macos: name: Run test suite for macOS systems @@ -149,80 +57,7 @@ jobs: contents: read id-token: write steps: - - uses: actions/checkout@v4 - - name: Install Nix - uses: ./ - with: - logger: pretty - log-directives: nix_installer=trace - backtrace: full - _internal-strict-mode: true - - name: echo $PATH - run: echo $PATH - - name: Test `nix` with `$GITHUB_PATH` - if: success() || failure() - run: | - nix run nixpkgs#hello - nix profile install nixpkgs#hello - hello - nix store gc - nix run nixpkgs#hello - - name: Test bash - run: nix-instantiate -E 'builtins.currentTime' --eval - if: success() || failure() - shell: bash --login {0} - - name: Test sh - run: nix-instantiate -E 'builtins.currentTime' --eval - if: success() || failure() - shell: sh -l {0} - - name: Test zsh - run: nix-instantiate -E 'builtins.currentTime' --eval - if: success() || failure() - shell: zsh --login --interactive {0} - - name: Install Nix again (noop) - uses: ./ - with: - logger: pretty - log-directives: nix_installer=trace - backtrace: full - _internal-strict-mode: true - - name: Test `nix` with `$GITHUB_PATH` - if: success() || failure() - run: | - nix run nixpkgs#hello - nix profile install nixpkgs#hello - hello - nix store gc - nix run nixpkgs#hello - - name: Reinstall Nix - uses: ./ - with: - logger: pretty - log-directives: nix_installer=trace - backtrace: full - reinstall: true - extra-conf: | - use-sqlite-wal = true - _internal-strict-mode: true - - name: Test `nix` with `$GITHUB_PATH` - if: success() || failure() - run: | - nix run nixpkgs#hello - nix profile install nixpkgs#hello - hello - nix store gc - nix run nixpkgs#hello - - name: Verify the generated nix.conf - run: | - cat /etc/nix/nix.conf - grep -E "^trusted-users = .*$USER" /etc/nix/nix.conf - grep -E "^use-sqlite-wal = true" /etc/nix/nix.conf - - name: Breakpoint if tests failed - if: failure() - uses: namespacelabs/breakpoint-action@v0 - with: - duration: 5m - authorized-users: grahamc + - run: exit 0 install-with-non-default-source-inputs: name: Install Nix using non-default source-${{ matrix.inputs.key }} @@ -240,11 +75,4 @@ jobs: nix-version: "2.19.2" steps: - - uses: actions/checkout@v4 - - name: Install with alternative source-${{ matrix.inputs.key }} - uses: ./ - with: - source-${{ matrix.inputs.key }}: ${{ matrix.inputs.value }} - _internal-strict-mode: true - - name: Ensure that the expected Nix version ${{ matrix.inputs.nix-version }} is installed via alternative source-${{ matrix.inputs.key }} - run: .github/verify-version.sh ${{ matrix.inputs.nix-version }} + - run: exit 0