-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds Hydrogen 2.0 (via Remix) Adapter #126
Closed
Closed
Changes from all commits
Commits
Show all changes
55 commits
Select commit
Hold shift + click to select a range
d1e5b5f
feat(hydrogen-edge-adapter): the adapter to run Hydrogen projects on …
zachleat 6f8e5bf
Merge branch 'main' into zl/hydrogen-adapter
zachleat e692460
chore: copy tweaks to hydrogen edge adapter readme
zachleat 1f84c92
chore: removes rogue package-lock file
zachleat 1dbc4d5
chore: update root package-lock file
zachleat a9cba64
Apply @LekoArts suggestions from code review
zachleat c7ef7c2
chore: remove sourcemaps from build output
zachleat ada91aa
chore: resolve pull request feedback
zachleat 6a8a257
chore: pull request feedback
zachleat 8b4ad85
chore: one more types removal
zachleat 4cb49ff
chore: update server file to use TypeScript
zachleat edd4e0f
chore: fix missing context info
zachleat 1d61d2b
Merge branch 'main' into zl/hydrogen-adapter
zachleat 423c60c
feat: adds hydrogen-demo-store to the repo
zachleat 5f33c14
Merge remote-tracking branch 'origin/main' into zl/hydrogen-adapter
nickytonline fa9acac
Merge remote-tracking branch 'origin/main' into zl/hydrogen-adapter
nickytonline 26b754f
chore: trigger build
nickytonline bcd6baf
chore: renamed hydrogen Netlify plugin to @netlify/hydrogen-integration
nickytonline 1969749
chore: added Hydrogen build integration to release please
nickytonline 115d746
Merge remote-tracking branch 'origin/main' into zl/hydrogen-adapter
nickytonline 12c87d1
chore: using build constants for paths now
nickytonline cb8f3d2
chore: testing build with no plugin for git push
nickytonline 411635c
Revert "chore: testing build with no plugin for git push"
nickytonline 71bdda9
Merge remote-tracking branch 'origin/main' into zl/hydrogen-adapter
nickytonline 9080b3f
chore: testing out config for git push deploy
nickytonline a29557d
chore: trying framework autodetect for hydrogen
nickytonline eadb61a
chore: trying another build integration file copy config
nickytonline 82d0422
chore: trying another build integration file copy config #2
nickytonline 1583441
chore: trying another build integration file copy config #3
nickytonline f7d6c15
chore: move edge function inline to demo site server.js
nickytonline 552ff0b
Merge remote-tracking branch 'origin/main' into zl/hydrogen-adapter
nickytonline 7fff63f
chore: added workaround for local deploy/serve vs/ git push deploy
nickytonline 4aca7ae
chore: trigger build
nickytonline 4cdf787
chore: trigger build
nickytonline d4545f3
chore: added logging to Hydrogen integration to see where files copy …
nickytonline 2d82368
chore: trigger build
nickytonline 3317984
chore: fixed missing CacheStorage crash issue
nickytonline 2b27ff2
test: added e2e tests for the demo store
nickytonline 365db81
test: added missing projectId for Cypress
nickytonline 261a351
chore: removed unused destructured constant
nickytonline 3269443
chore: added some types
nickytonline 787a89e
chore: upgraded to @shopify/hydrogen 2023.7.0
nickytonline 9f33921
Merge remote-tracking branch 'origin' into zl/hydrogen-adapter
nickytonline 39e9bbc
chore: trigger build
nickytonline f28bc48
Merge remote-tracking branch 'origin' into zl/hydrogen-adapter
nickytonline 5c93624
Merge remote-tracking branch 'origin' into zl/hydrogen-adapter
nickytonline bd1b37d
chore: updated Netlify config with dev and build commands
nickytonline aeafdbf
chore: removed Netlify Hydrogen build plugin
nickytonline fed6f0e
chore: added back package builds for hydrogen-edge-adapter
nickytonline 9acdae2
Revert "chore: removed Netlify Hydrogen build plugin"
nickytonline e2ba401
chore: removed a console.dir
nickytonline 2fd5e6f
Merge remote-tracking branch 'origin' into zl/hydrogen-adapter
nickytonline 7a18fff
Merge remote-tracking branch 'origin' into zl/hydrogen-adapter
nickytonline 97d40d3
chore: trigger build
nickytonline d4f5b50
Merge remote-tracking branch 'origin' into zl/hydrogen-adapter
nickytonline File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
@@ -0,0 +1,68 @@ | ||
name: Run e2e (Remix Hydrogen Store Demo) | ||
on: | ||
pull_request: | ||
types: [opened, synchronize] | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
cypress: | ||
name: Cypress | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
containers: [1] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Generate Github token | ||
uses: navikt/github-app-token-generator@v1 | ||
id: get-token | ||
with: | ||
private-key: ${{ secrets.TOKENS_PRIVATE_KEY }} | ||
app-id: ${{ secrets.TOKENS_APP_ID }} | ||
|
||
- name: Checkout @netlify/wait-for-deploy-action | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: netlify/wait-for-deploy-action | ||
token: ${{ steps.get-token.outputs.token }} | ||
path: ./.github/actions/wait-for-netlify-deploy | ||
|
||
- name: Wait for Netlify Deploy | ||
id: deploy | ||
uses: ./.github/actions/wait-for-netlify-deploy | ||
with: | ||
site-name: hydrogen-demo-site | ||
timeout: 300 | ||
|
||
- name: Deploy successful | ||
if: ${{ steps.deploy.outputs.origin-url }} | ||
run: echo ${{ steps.deploy.outputs.origin-url }} | ||
|
||
- name: Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16' | ||
|
||
- run: npm install | ||
|
||
- name: Cypress run | ||
if: ${{ steps.deploy.outputs.origin-url }} | ||
id: cypress | ||
uses: cypress-io/github-action@v2 | ||
with: | ||
browser: chrome | ||
headless: true | ||
record: true | ||
parallel: true | ||
config-file: cypress/config/demo-store-cypress.config.ts | ||
group: 'Remix Hydrogen Store Demo' | ||
env: | ||
DEBUG: '@cypress/github-action' | ||
CYPRESS_baseUrl: ${{ steps.deploy.outputs.origin-url }} | ||
CYPRESS_NETLIFY_CONTEXT: ${{ steps.deploy.outputs.context }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
CYPRESS_RECORD_KEY: ${{ secrets.REMIX_EDGE_CYPRESS_RECORD_KEY }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"packages/remix-edge-adapter":"2.0.0","packages/remix-runtime":"1.1.0","packages/remix-adapter":"1.0.0"} | ||
{ "packages/remix-edge-adapter": "2.0.0", "packages/remix-runtime": "1.1.0", "packages/remix-adapter": "1.0.0" } |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { defineConfig } from 'cypress' | ||
|
||
export default defineConfig({ | ||
e2e: { | ||
baseUrl: 'http://localhost:3000', | ||
specPattern: 'cypress/e2e/demo-store/**/*.spec.ts', | ||
projectId: 'k847hv', | ||
setupNodeEvents(on, config) { | ||
Check warning on line 8 in cypress/config/demo-store-cypress.config.ts GitHub Actions / Unit tests (ubuntu-latest)
Check warning on line 8 in cypress/config/demo-store-cypress.config.ts GitHub Actions / Unit tests (ubuntu-latest)
Check warning on line 8 in cypress/config/demo-store-cypress.config.ts GitHub Actions / Unit tests (macOS-latest)
Check warning on line 8 in cypress/config/demo-store-cypress.config.ts GitHub Actions / Unit tests (macOS-latest)
Check warning on line 8 in cypress/config/demo-store-cypress.config.ts GitHub Actions / Unit tests (windows-latest)
|
||
// implement node event listeners here | ||
}, | ||
}, | ||
}) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
describe('Demo Store Smoke Test', () => { | ||
it('Should load the demo store', () => { | ||
cy.visit('/') | ||
cy.findByRole('heading', { name: /Hydrogen/i }).should('exist') | ||
// Using \s here because there is an in the text and checking for that doesn't work | ||
cy.findByRole('heading', { name: /All Mountain All\sSeason/i }).should('exist') | ||
cy.findByRole('link', { name: /Collections/i }).should('exist') | ||
cy.findByRole('link', { name: /Products/i }).should('exist') | ||
cy.findByRole('link', { name: /Journal/i }).should('exist') | ||
}) | ||
|
||
it('Should load a product collection', () => { | ||
Cypress.on('uncaught:exception', (err) => { | ||
// returning false here prevents Cypress from | ||
// failing the test | ||
console.log('Cypress detected uncaught exception: ', err) | ||
return false | ||
}) | ||
|
||
cy.visit('/collections') | ||
cy.findByRole('heading', { name: /Freestyle Collection/i }).should('exist') | ||
// forcing the click as another element is covering the image in the DOM | ||
cy.findByRole('img', { | ||
name: /A snowboarder stands atop a snowy mountain holding his snowboard with the back facing the camera. The snowboard artwork reads Hydrogen, in a script font/i, | ||
}).click({ force: true }) | ||
cy.findByRole('heading', { name: /Freestyle Collection/i }).should('exist') | ||
}) | ||
|
||
it('Should load a product page', () => { | ||
cy.visit('/products/') | ||
cy.findByRole('link', { name: /The Hydrogen Snowboard/i }).click() | ||
cy.findByRole('heading', { name: /The Hydrogen Snowboard/i }).should('exist') | ||
}) | ||
|
||
it('Should load a journal', () => { | ||
cy.visit('/journal') | ||
cy.findByRole('heading', { name: /The Best Places for Backcountry Snowboarding/i }).click() | ||
cy.findByRole('heading', { name: /The Best Places for Backcountry Snowboarding/i }).should('exist') | ||
cy.findAllByRole('img', { name: /Model sits on a red brick wall in front of the ocean/i }).should('exist') | ||
}) | ||
}) |
File renamed without changes.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT: Should
hydrogen-demo-site
be added to this list?