-
-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add integration tests for create-houdini (#1204)
- Loading branch information
Showing
11 changed files
with
138 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -75,13 +75,15 @@ jobs: | |
id: pnpm-cache | ||
run: | | ||
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)" | ||
- uses: actions/cache@v3 | ||
name: Setup pnpm cache | ||
with: | ||
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-store- | ||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
|
@@ -91,8 +93,8 @@ jobs: | |
- name: Tests | ||
run: pnpm run tests | ||
|
||
verify_create: | ||
name: Verify Create | ||
verify_init: | ||
name: Verify Init | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout source | ||
|
@@ -140,6 +142,62 @@ jobs: | |
|
||
- name: Run init | ||
run: cd project && node ../houdini/packages/houdini/build/cmd-esm/index.js init -y | ||
|
||
verify_create: | ||
name: Verify Create | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
template: [react, react-typescript, sveltekit-demo] | ||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.ref }} | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.17.1 | ||
|
||
- uses: pnpm/[email protected] | ||
name: Install pnpm | ||
id: pnpm-install | ||
with: | ||
version: 8 | ||
|
||
- name: Get pnpm store directory | ||
id: pnpm-cache | ||
run: | | ||
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)" | ||
- uses: actions/cache@v3 | ||
name: Setup pnpm cache | ||
with: | ||
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-store- | ||
- name: Install dependencies | ||
run: cd packages/create-houdini && pnpm install | ||
|
||
- name: Create template (local) | ||
if: matrix.template != 'sveltekit-demo' | ||
run: cd packages/create-houdini && pnpm dev test-${{ matrix.template }} -t ${{ matrix.template }} -s local | ||
|
||
- name: Create template (not local) | ||
if: matrix.template == 'sveltekit-demo' | ||
run: cd packages/create-houdini && pnpm dev test-${{ matrix.template }} -t ${{ matrix.template }} | ||
|
||
- run: cd packages/create-houdini/test-${{ matrix.template }} && npx playwright install | ||
|
||
- name: e2e install | ||
run: cd packages/create-houdini/test-${{ matrix.template }} && npm i | ||
|
||
- name: e2e tests | ||
if: matrix.template == 'sveltekit-demo' | ||
run: cd packages/create-houdini/test-${{ matrix.template }} && npm run test:integration | ||
|
||
e2e_tests: | ||
name: End-to-End Tests | ||
|
@@ -256,4 +314,4 @@ jobs: | |
run: pnpm --filter e2e-kit run lint | ||
|
||
- name: End-to-End check | ||
run: pnpm --filter e2e-kit run check | ||
run: pnpm --filter e2e-kit run check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
test-* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
packages/create-houdini/templates/react-typescript/.graphqlrc.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
projects: | ||
default: | ||
schema: | ||
- ./$houdini/graphql/schema.graphql | ||
documents: | ||
- '**/*.gql' | ||
- '**/*.tsx' | ||
- ./$houdini/graphql/documents.gql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
projects: | ||
default: | ||
schema: | ||
- ./$houdini/graphql/schema.graphql | ||
documents: | ||
- '**/*.gql' | ||
- '**/*.jsx' | ||
- ./$houdini/graphql/documents.gql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.