diff --git a/.github/workflows/test-all.yaml b/.github/workflows/test-all.yaml index b48b87760..dc328fe48 100644 --- a/.github/workflows/test-all.yaml +++ b/.github/workflows/test-all.yaml @@ -19,7 +19,7 @@ jobs: - name: generate matrix id: matrix run: | - echo "matrix=$(ls implementations | jq -cnR '[inputs | select(. | test("^[a-z]") and . != "appsync" and . != "stepzen")]')" >> $GITHUB_OUTPUT + echo "matrix=$(ls implementations | jq -cnR '[inputs | select(. | test("^[a-z]") and . != "appsync" and . != "stepzen" and . != "grafbase")]')" >> $GITHUB_OUTPUT test: needs: build-matrix @@ -51,6 +51,12 @@ jobs: secrets: TEST_URL: ${{ secrets.URL_STEPZEN }} + # needs GHCR authentication + test-grafbase: + uses: ./github/workflows/test-subgraph-grafbase.yaml + with: + skip_pr_info: true + report: timeout-minutes: 10 needs: [test, test-stepzen] diff --git a/.github/workflows/test-subgraph-grafbase.yaml b/.github/workflows/test-subgraph-grafbase.yaml index 096bc26f3..6dd7381f6 100644 --- a/.github/workflows/test-subgraph-grafbase.yaml +++ b/.github/workflows/test-subgraph-grafbase.yaml @@ -6,14 +6,53 @@ on: - main paths: - 'implementations/grafbase/**' + workflow_call: + inputs: + skip_pr_info: + default: false + description: Whether to skip saving PR info. + required: false + type: boolean + +env: + SKIP_PR: ${{ inputs.skip_pr_info || false }} jobs: + # compatibility: + # uses: ./.github/workflows/test-subgraph.yaml + # with: + # library: "grafbase" compatibility: - uses: ./.github/workflows/test-subgraph.yaml - with: - library: "grafbase" + timeout-minutes: 30 + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + - name: Setup Environment + uses: actions/setup-node@v4 + with: + node-version: 18 + cache: 'npm' + - name: Log in to registry + run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin + - name: Install dependencies and build + run: npm install + - name: Compatibility test + run: npm run compatibility:test -- docker --compose implementations/grafbase/docker-compose.yaml --schema implementations/_template_library_/products.graphql --format markdown + - name: Generate Results Summary + run: | + cat results.md >> $GITHUB_STEP_SUMMARY + echo "RESULTS_FILE=results.md" >> $GITHUB_ENV + - name: Upload Results + uses: actions/upload-artifact@v4 + with: + name: ${{ env.RESULTS_FILE }} + path: ./${{ env.RESULTS_FILE }} + retention-days: 1 + pr-info: uses: ./.github/workflows/save-pr-info.yaml + if: {{ env.SKIP_PR != true }} with: pr_number: ${{ github.event.number }}