supabase-postgres.git / summary / log / commit / refs
commit 2b07c9c86dfed6e092ade291f035ee87dfeccc17
Author: Jean-François Roche <jfroche@pyxel.be>
Commit: GitHub <noreply@github.com>
Date: Thu Jun 19 17:44:29 2025 +0000
ci: fix workflow dependencies (#1659)
We want to run test.yaml and testinfra-ami-build.yaml after
nix-build.yaml. We start using reusable workflow instead of relying on
workflow_run which doesn't work well with pull requests.
.github/workflows/nix-build.yml | 14 +++++++++++++-
.github/workflows/test.yml | 8 +-------
.github/workflows/testinfra-ami-build.yml | 8 +-------
3 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/.github/workflows/nix-build.yml b/.github/workflows/nix-build.yml
index 82aab37f..d562ab6c 100644
--- a/.github/workflows/nix-build.yml
+++ b/.github/workflows/nix-build.yml
@@ -9,8 +9,10 @@ on:
workflow_dispatch:
permissions:
- contents: read
id-token: write
+ #Â required by testinfra-ami-build dependent workflows
+ contents: write
+ packages: write
jobs:
build-run-image:
@@ -84,3 +86,13 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ env.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ env.AWS_SECRET_ACCESS_KEY }}
AWS_SESSION_TOKEN: ${{ env.AWS_SESSION_TOKEN }}
+
+ run-testinfra:
+ needs: build-run-image
+ if: ${{ success() }}
+ uses: ./.github/workflows/testinfra-ami-build.yml
+
+ run-tests:
+ needs: build-run-image
+ if: ${{ success() }}
+ uses: ./.github/workflows/test.yml
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index b907c85d..6be36878 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -1,11 +1,7 @@
name: Test Database
on:
- # Trigger this workflow when the "Nix CI" workflow completes
- workflow_run:
- workflows: ["Nix CI"]
- types:
- - completed
workflow_dispatch:
+ workflow_call:
permissions:
contents: read
@@ -13,7 +9,6 @@ permissions:
jobs:
prepare:
- if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
runs-on: large-linux-x86
outputs:
postgres_versions: ${{ steps.set-versions.outputs.postgres_versions }}
@@ -31,7 +26,6 @@ jobs:
VERSIONS=$(nix run nixpkgs#yq -- '.postgres_major[]' ansible/vars.yml | nix run nixpkgs#jq -- -R -s -c "split(\"\n\")[:-1]")
echo "postgres_versions=$VERSIONS" >> $GITHUB_OUTPUT
build:
- if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
needs: prepare
strategy:
matrix:
diff --git a/.github/workflows/testinfra-ami-build.yml b/.github/workflows/testinfra-ami-build.yml
index 2e1edda4..8544f1b8 100644
--- a/.github/workflows/testinfra-ami-build.yml
+++ b/.github/workflows/testinfra-ami-build.yml
@@ -1,12 +1,8 @@
name: Testinfra Integration Tests Nix
on:
- # Trigger this workflow when the "Nix CI" workflow completes
- workflow_run:
- workflows: ["Nix CI"]
- types:
- - completed
workflow_dispatch:
+ workflow_call:
permissions:
contents: read
@@ -14,7 +10,6 @@ permissions:
jobs:
prepare:
- if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
runs-on: large-linux-x86
outputs:
postgres_versions: ${{ steps.set-versions.outputs.postgres_versions }}
@@ -31,7 +26,6 @@ jobs:
echo "postgres_versions=$VERSIONS" >> $GITHUB_OUTPUT
test-ami-nix:
- if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
needs: prepare
strategy:
fail-fast: false
[parent: 4a073c2f272b]