Skip to content

Commit

Permalink
ci: Remove nix actions cache and prepopulate job
Browse files Browse the repository at this point in the history
The nix actions cache currently leads to repeated "no space left on
devices" errors for jobs in CI.

The prepopulate job is useless without the nix actions cache, so it
will go away at the same time.
  • Loading branch information
wolfgangwalther committed Feb 10, 2024
1 parent 5424be7 commit 8a3b0c6
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 31 deletions.
9 changes: 0 additions & 9 deletions .github/actions/setup-nix/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,13 @@ inputs:
description: Token to pass to cachix
tools:
description: Tools to install with nix-env -iA <tools>
cache-id:
description: Cache id to use for cache-nix-action
default: "default"

runs:
using: composite
steps:
- uses: nixbuild/nix-quick-install-action@v26
with:
nix_version: '2.13.6'
- name: Restore and cache Nix store
uses: nix-community/[email protected]
with:
key: cache-nix-${{ runner.os }}-${{ inputs.cache }}-${{ hashFiles('**/*.nix', 'nix/**/*.patch') }}
restore-keys: |
cache-nix-${{ runner.os }}-${{ inputs.cache }}-
- uses: cachix/cachix-action@v14
with:
name: postgrest
Expand Down
20 changes: 0 additions & 20 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,30 +18,16 @@ concurrency:
cancel-in-progress: "${{ !(github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/heads/rel-')) }}"

jobs:
Prepopulate-Nix-Cache-Linux:
name: Prepopulate Nix cache for Linux runners
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Nix Environment
uses: ./.github/actions/setup-nix
with:
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
cache-id: common
tools: style withTools memory tests release postgrestPackage

Lint-Style:
name: Lint & check code style
runs-on: ubuntu-latest
needs: [Prepopulate-Nix-Cache-Linux]
steps:
- uses: actions/checkout@v4
- name: Setup Nix Environment
uses: ./.github/actions/setup-nix
with:
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
tools: style
cache-id: common
- name: Run linter (check locally with `nix-shell --run postgrest-lint`)
run: postgrest-lint
- name: Run style check (auto-format with `nix-shell --run postgrest-style`)
Expand All @@ -51,7 +37,6 @@ jobs:
Test-Nix:
name: Test (Nix)
runs-on: ubuntu-latest
needs: [Prepopulate-Nix-Cache-Linux]
defaults:
run:
# Hack for enabling color output, see:
Expand All @@ -64,7 +49,6 @@ jobs:
with:
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
tools: tests
cache-id: common

- name: Run coverage (IO tests and Spec tests against PostgreSQL 15)
run: postgrest-coverage
Expand All @@ -89,7 +73,6 @@ jobs:
pgVersion: [9.6, 10, 11, 12, 13, 14, 15, 16]
name: Test PG ${{ matrix.pgVersion }} (Nix)
runs-on: ubuntu-latest
needs: [Prepopulate-Nix-Cache-Linux]
defaults:
run:
# Hack for enabling color output, see:
Expand All @@ -102,7 +85,6 @@ jobs:
with:
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
tools: tests withTools
cache-id: common

- name: Run spec tests
if: always()
Expand All @@ -116,15 +98,13 @@ jobs:
Test-Memory-Nix:
name: Test memory (Nix)
runs-on: ubuntu-latest
needs: [Prepopulate-Nix-Cache-Linux]
steps:
- uses: actions/checkout@v4
- name: Setup Nix Environment
uses: ./.github/actions/setup-nix
with:
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
tools: memory
cache-id: common
- name: Run memory tests
run: postgrest-test-memory

Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/loadtest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ jobs:
uses: ./.github/actions/setup-nix
with:
tools: loadtest
cache-id: test-loadtest
- uses: actions-ecosystem/action-get-latest-tag@v1
id: get-latest-tag
with:
Expand Down Expand Up @@ -58,7 +57,6 @@ jobs:
uses: ./.github/actions/setup-nix
with:
tools: loadtest
cache-id: test-loadtest
- name: Run loadtest
run: |
postgrest-loadtest-against ${{ steps.get-latest-tag.outputs.tag }}
Expand Down

0 comments on commit 8a3b0c6

Please sign in to comment.