Skip to content

Commit

Permalink
Merge pull request #8 from esseswann/fix/schema-name-in-processView
Browse files Browse the repository at this point in the history
fix: schema name in processView()
  • Loading branch information
esseswann authored Sep 29, 2023
2 parents d0c2387 + 35ddf5c commit bc919b9
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 16 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/npm-publish-github-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ on:
- master

jobs:
test:
uses: ./.github/workflows/test-base.yml
with:
DATABASE_NAME: ${{ vars.DATABASE_NAME }}
secrets:
authorized_key: inherit

publish-gpr:
runs-on: ubuntu-latest
permissions:
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/test-base.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: test-base

on:
workflow_call:
inputs:
DATABASE_NAME:
required: true
type: string
secrets:
AUTHORIZED_KEY:
required: true

jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
- run: npm ci
- name: Add authorized key
run: echo '${{ secrets.authorized_key }}' > tests/authorized_key.json
- name: Run tests
env:
DATABASE_NAME: ${{ inputs.DATABASE_NAME }}
NODE_ENV: development
run: npm test
19 changes: 4 additions & 15 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,7 @@ on: [pull_request]

jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
- run: npm ci
- name: Add authorized key
run: echo '${{ secrets.AUTHORIZED_KEY }}' > tests/authorized_key.json
- name: Run tests
env:
DATABASE_NAME: ${{ vars.DATABASE_NAME }}
NODE_ENV: development
run: npm test
uses: ./.github/workflows/test-base.yml
with:
DATABASE_NAME: ${{ vars.DATABASE_NAME }}
secrets: inherit
2 changes: 1 addition & 1 deletion src/metadata/extractMetadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ async function processViews(directory: string, schema: Schema) {

checkView(baseName, view) // FIXME: assuming checkView doesn't have side effects

schema.set(`${QUERY}.${name}`, {
schema.set(`${QUERY}.${baseName}`, {
view,
name: baseName,
cardinality: 'many',
Expand Down

0 comments on commit bc919b9

Please sign in to comment.