set path to path: ./packages/**/dist/**

This commit is contained in:
Murat Ozcan 2022-05-04 10:45:19 -05:00
parent f770ac60d5
commit b6d5277cc7
5 changed files with 16 additions and 10 deletions

4
.env.local Normal file
View File

@ -0,0 +1,4 @@
COMMERCE_PROVIDER=@vercel/commerce-shopify
NEXT_PUBLIC_SHOPIFY_STOREFRONT_ACCESS_TOKEN=e66b1627171548eabbb8aa425d085fc5
NEXT_PUBLIC_SHOPIFY_STORE_DOMAIN=cypress-murat-shop.myshopify.com
NEXT_PUBLIC_COMMERCE_SEARCH_ENABLED=true

View File

@ -49,7 +49,7 @@ jobs:
with: with:
name: build name: build
if-no-files-found: error if-no-files-found: error
path: dist path: ./packages/**/dist/**
ui-chrome-tests: ui-chrome-tests:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -67,7 +67,7 @@ jobs:
uses: actions/download-artifact@v2 uses: actions/download-artifact@v2
with: with:
name: build name: build
path: dist path: ./packages/**/dist/**
- name: 'Chrome E2E Tests' - name: 'Chrome E2E Tests'
uses: cypress-io/github-action@v2 uses: cypress-io/github-action@v2

1
.gitignore vendored
View File

@ -28,7 +28,6 @@ yarn-error.log*
# local env files # local env files
.env .env
.env.local
.env.development.local .env.development.local
.env.test.local .env.test.local
.env.production.local .env.production.local

View File

@ -4,8 +4,7 @@ At Extend, Shopify is one of the merchants we integrate with to sell warranties
I will capture any feedback here while going through the content, for the purpose of making the content as frictionless as possible, so that adoption is higher for Extend as well as any Cypress users who want to perform self-learning. I will capture any feedback here while going through the content, for the purpose of making the content as frictionless as possible, so that adoption is higher for Extend as well as any Cypress users who want to perform self-learning.
TL, DR; the source repo is vastly different and environment variables are not possible to get to work as described. All the below are a consequence of that. TL, DR; the source repo is vastly different and environment variables are not possible to get to work as described. All the below are a consequence of that. I have included the .env.local file so that one can try to reproduce these issues. At the end, these issues can be figured out but it requires a high amount of know-how and willpower. We need to make it so that things work with batteries included, without having to wrestle anything. One should compare the below comments to the final version of the code while going through it.
At the end, these issues can be figured out but it requires a high amount of know-how and willpower. We need to make it so that things work with batteries included, without having to wrestle anything.
## [Part 1- Creating a Shopify Partners Store](https://learn.cypress.io/tutorials/creating-a-shopify-partners-store) ## [Part 1- Creating a Shopify Partners Store](https://learn.cypress.io/tutorials/creating-a-shopify-partners-store)
@ -407,7 +406,7 @@ it('the search bar returns the correct search results', () => {
## [Part 5 Running Our Tests in Parallel with Cypress Dashboard](https://learn.cypress.io/tutorials/running-our-tests-in-parallel-with-cypress-dashboard) ## [Part 5 Running Our Tests in Parallel with Cypress Dashboard](https://learn.cypress.io/tutorials/running-our-tests-in-parallel-with-cypress-dashboard)
As of today May 4th, 2022, Cypress Dashboard looks different and those screen shots should be updated. As of today May 4th, 2022, Cypress Dashboard looks different and the screen shots should be updated.
--- ---
@ -417,7 +416,7 @@ Question about `GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}`. Cypress Dashboard re
Running things in CI and seeing it on the dashboard, I have lost the relevance between a locally served app and what runs in the CI. The two are entirely different! Somehow the app in CI has the Shopify concept. But the local app is the template app. Running things in CI and seeing it on the dashboard, I have lost the relevance between a locally served app and what runs in the CI. The two are entirely different! Somehow the app in CI has the Shopify concept. But the local app is the template app.
This is because the environment variables are not working using the `.env.local` file. The users will need help getting these to work in a solid way. For now I am exporting them in the command line. This is because the environment variables are not working using the `.env.local` file. The users will need help getting these to work in a solid way. For now I am exporting them in the command line. I have included the .env.local file so that one can try to reproduce these issues.
________ ________
@ -425,7 +424,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. 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.
https://github.com/muratkeremozcan/nextjs-cypress/runs/6292547384?check_suite_focus=true https://github.com/muratkeremozcan/nextjs-cypress/runs/6292547384?check_suite_focus=true

View File

@ -14,6 +14,10 @@ interface NavbarProps {
links?: Link[] links?: Link[]
} }
// These do not really work with built-in vercel things..
// I had to export them in bash
// export COMMERCE_PROVIDER=@vercel/commerce-shopify NEXT_PUBLIC_COMMERCE_SEARCH_ENABLED=true etc.
console.log('COMMERCE_PROVIDER: ', process.env.COMMERCE_PROVIDER) console.log('COMMERCE_PROVIDER: ', process.env.COMMERCE_PROVIDER)
console.log( console.log(
'NEXT_PUBLIC_SHOPIFY_STOREFRONT_ACCESS_TOKEN: ', 'NEXT_PUBLIC_SHOPIFY_STOREFRONT_ACCESS_TOKEN: ',
@ -56,7 +60,7 @@ const Navbar: FC<NavbarProps> = ({ links }) => (
))} ))}
</nav> </nav>
</div> </div>
{true && ( {process.env.NEXT_PUBLIC_COMMERCE_SEARCH_ENABLED && (
<div className="justify-center flex-1 hidden lg:flex"> <div className="justify-center flex-1 hidden lg:flex">
<Searchbar /> <Searchbar />
</div> </div>
@ -65,7 +69,7 @@ const Navbar: FC<NavbarProps> = ({ links }) => (
<UserNav /> <UserNav />
</div> </div>
</div> </div>
{true && ( {process.env.NEXT_PUBLIC_COMMERCE_SEARCH_ENABLED && (
<div className="flex pb-4 lg:px-6 lg:hidden"> <div className="flex pb-4 lg:px-6 lg:hidden">
<Searchbar id="mobile-search" /> <Searchbar id="mobile-search" />
</div> </div>