Skip to content

Commit

Permalink
chore: add ghcr login for grafbase (#620)
Browse files Browse the repository at this point in the history
  • Loading branch information
dariuszkuc authored May 17, 2024
1 parent da565cd commit 8e7650d
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 4 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/test-all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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]
Expand Down
45 changes: 42 additions & 3 deletions .github/workflows/test-subgraph-grafbase.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

0 comments on commit 8e7650d

Please sign in to comment.