From f770ac60d53f360949427fe17c0dbf3748699eba Mon Sep 17 00:00:00 2001 From: Murat Ozcan Date: Wed, 4 May 2022 10:37:11 -0500 Subject: [PATCH] set dist as the path --- .github/workflows/main.yml | 37 ++++++++++++++++++++----------------- package.json | 1 - site/comments.md | 4 ++++ site/tsconfig.json | 4 ++-- 4 files changed, 26 insertions(+), 20 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ed68bb607..8b1fac011 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -27,26 +27,29 @@ jobs: # # pass GitHub token to allow accurately detecting a build vs a re-run build # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + ############################################################################################################################# + # Version 2: install in one job, parallelize the e2e jobs - name: Cypress install uses: cypress-io/github-action@v2 with: runTests: false - # probably Vercel relevant. No idea why we have to build anything, so far + # probably Vercel relevant. No idea why we have to build anything # In version 1, I did not have to build anything to get things to work in CI - # - run: yarn build - # env: - # COMMERCE_PROVIDER: ${{ secrets.COMMERCE_PROVIDER }} - # NEXT_PUBLIC_SHOPIFY_STORE_DOMAIN: ${{ secrets.NEXT_PUBLIC_SHOPIFY_STORE_DOMAIN }} - # NEXT_PUBLIC_SHOPIFY_STOREFRONT_ACCESS_TOKEN: ${{ secrets.NEXT_PUBLIC_SHOPIFY_STOREFRONT_ACCESS_TOKEN }} + # here, without the build job generating an artifact, the test jobs do not really get items related to our store + - run: yarn build + env: + COMMERCE_PROVIDER: ${{ secrets.COMMERCE_PROVIDER }} + NEXT_PUBLIC_SHOPIFY_STORE_DOMAIN: ${{ secrets.NEXT_PUBLIC_SHOPIFY_STORE_DOMAIN }} + NEXT_PUBLIC_SHOPIFY_STOREFRONT_ACCESS_TOKEN: ${{ secrets.NEXT_PUBLIC_SHOPIFY_STOREFRONT_ACCESS_TOKEN }} - # - name: Save build folder - # uses: actions/upload-artifact@v2 - # with: - # name: build - # if-no-files-found: error - # path: build + - name: Save build folder + uses: actions/upload-artifact@v2 + with: + name: build + if-no-files-found: error + path: dist ui-chrome-tests: runs-on: ubuntu-latest @@ -60,11 +63,11 @@ jobs: uses: actions/checkout@v2 # must be Vercel relevant. No idea why we have to build anything - # - name: Download the build folders - # uses: actions/download-artifact@v2 - # with: - # name: build - # path: build + - name: Download the build folders + uses: actions/download-artifact@v2 + with: + name: build + path: dist - name: 'Chrome E2E Tests' uses: cypress-io/github-action@v2 diff --git a/package.json b/package.json index bb2390fc3..1566df340 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,6 @@ }, "devDependencies": { "cypress": "^9.6.0", - "dotenv": "^16.0.0", "husky": "^7.0.4", "prettier": "^2.5.1", "turbo": "^1.1.2" diff --git a/site/comments.md b/site/comments.md index 21af578f2..1ac2d32ae 100644 --- a/site/comments.md +++ b/site/comments.md @@ -425,3 +425,7 @@ In the parallelization section, the jobs with `yarn build` and `save build folde __________ +Unsure about any of the `build` instructions. The yml at the end of Part 5 does not work as advertised. The build job does not generate a build path and errors out. We should just be able to install and cache to perpetual jobs in an easy way without having to crud the build folder. + +https://github.com/muratkeremozcan/nextjs-cypress/runs/6292547384?check_suite_focus=true + diff --git a/site/tsconfig.json b/site/tsconfig.json index 2de809a44..7c91afd6f 100644 --- a/site/tsconfig.json +++ b/site/tsconfig.json @@ -23,8 +23,8 @@ "@components/*": ["components/*"], "@commerce": ["../packages/commerce/src"], "@commerce/*": ["../packages/commerce/src/*"], - "@framework": ["../packages/shopify/src"], - "@framework/*": ["../packages/shopify/src/*"] + "@framework": ["../packages/local/src"], + "@framework/*": ["../packages/local/src/*"] } }, "include": ["next-env.d.ts", "**/*.d.ts", "**/*.ts", "**/*.tsx", "**/*.js"],