From 804b5c83345806bbf7737643f5dae1f8cc3fc23a Mon Sep 17 00:00:00 2001 From: Reza Rahman Date: Tue, 1 Nov 2022 17:03:31 +0000 Subject: [PATCH 1/4] bypass interactive on astro test --- .github/workflows/integration_test_astro.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration_test_astro.yml b/.github/workflows/integration_test_astro.yml index 3f97dc7c4..7166ad3b8 100644 --- a/.github/workflows/integration_test_astro.yml +++ b/.github/workflows/integration_test_astro.yml @@ -67,7 +67,7 @@ jobs: run: cd packages/react/ && npm pack - name: Configuring Astro React / TypeScript project - run: npm create astro@latest ${{env.ASTRO_FOLDER}} -- --template framework-react + run: yes | npm create astro@latest ${{env.ASTRO_FOLDER}} -- --template framework-react - name: Retrieving package version id: package-version From 29253a79651ae6ed78ccf0d6f2f401a82e2db48a Mon Sep 17 00:00:00 2001 From: Reza Rahman Date: Tue, 1 Nov 2022 17:26:10 +0000 Subject: [PATCH 2/4] lock to v1.1 astro --- .github/workflows/integration_test_astro.yml | 4 +++- .github/workflows/release_canary.yml | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/integration_test_astro.yml b/.github/workflows/integration_test_astro.yml index 7166ad3b8..b2dfe4370 100644 --- a/.github/workflows/integration_test_astro.yml +++ b/.github/workflows/integration_test_astro.yml @@ -67,7 +67,9 @@ jobs: run: cd packages/react/ && npm pack - name: Configuring Astro React / TypeScript project - run: yes | npm create astro@latest ${{env.ASTRO_FOLDER}} -- --template framework-react + # lock version to 1.1.0 due to non-tty support removed in 1.2.0 + # TODO: review Astro updates regularly to using @latest + run: npm create astro@1.1.0 ${{env.ASTRO_FOLDER}} -- --template framework-react - name: Retrieving package version id: package-version diff --git a/.github/workflows/release_canary.yml b/.github/workflows/release_canary.yml index c4f0827ea..72c612440 100644 --- a/.github/workflows/release_canary.yml +++ b/.github/workflows/release_canary.yml @@ -8,7 +8,7 @@ on: jobs: release-canary: - if: ${{ github.repository == 'primer/brand' }} + if: false name: Canary runs-on: ubuntu-latest steps: From 9f5cb3549b84450f353e5653adb36bdfff7dc2d8 Mon Sep 17 00:00:00 2001 From: Reza Rahman Date: Wed, 2 Nov 2022 09:59:06 +0000 Subject: [PATCH 3/4] add eslint rules for nextjs --- .github/workflows/integration_test_nextjs.yml | 7 ++++++- packages/e2e/integration-tests/nextjs/.eslintrc | 8 ++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 packages/e2e/integration-tests/nextjs/.eslintrc diff --git a/.github/workflows/integration_test_nextjs.yml b/.github/workflows/integration_test_nextjs.yml index 6d9cef5af..238797fc7 100644 --- a/.github/workflows/integration_test_nextjs.yml +++ b/.github/workflows/integration_test_nextjs.yml @@ -77,7 +77,7 @@ jobs: - name: Installing local build run: | - cd ${{env.NEXTJS_FOLDER}} + cd ${{env.NEXTJS_FOLDER}} cp ../packages/react/primer-react-brand-${{ steps.package-version.outputs.current-version}}.tgz ./ npm install primer-react-brand-${{ steps.package-version.outputs.current-version}}.tgz @@ -89,6 +89,7 @@ jobs: - name: Copying required files run: | cp ./packages/e2e/integration-tests/nextjs/index.tsx ./${{env.NEXTJS_FOLDER}}/pages + cp ./packages/e2e/integration-tests/nextjs/.eslintrc ./${{env.NEXTJS_FOLDER}} cp ./packages/e2e/cypress.config.js ./${{env.NEXTJS_FOLDER}} mkdir ${{env.NEXTJS_FOLDER}}/integration-tests cp -r ./packages/e2e/integration-tests/fixtures ./${{env.NEXTJS_FOLDER}}/integration-tests @@ -105,6 +106,10 @@ jobs: - name: Excluded cypress tests in-place run: npx json -I -f ${{env.NEXTJS_FOLDER}}/tsconfig.json -e 'this.exclude=["node_modules", "**/*.cy.ts"]' + - name: Fix monorepo-related linting issues + run: | + npm run lint -- --fix + - name: Testing compile-time build run: cd ${{env.NEXTJS_FOLDER}} && npm run build diff --git a/packages/e2e/integration-tests/nextjs/.eslintrc b/packages/e2e/integration-tests/nextjs/.eslintrc new file mode 100644 index 000000000..f858d2d90 --- /dev/null +++ b/packages/e2e/integration-tests/nextjs/.eslintrc @@ -0,0 +1,8 @@ +{ + "extends": "next", + "rules": { + "eslint-comments/no-unlimited-disable": "off", + "eslint-comments/no-use": "off", + "react/react-in-jsx-scope": "off" + } +} From 545680f8f6e7b95b7a6a62f0489850b553d23cf4 Mon Sep 17 00:00:00 2001 From: Reza Rahman Date: Wed, 2 Nov 2022 10:20:31 +0000 Subject: [PATCH 4/4] add cron schedule for main branch (daily) --- .github/workflows/integration_test_astro.yml | 2 ++ .github/workflows/integration_test_cra.yml | 2 ++ .github/workflows/integration_test_nextjs.yml | 2 ++ .github/workflows/integration_test_remix.yml | 2 ++ .github/workflows/release_canary.yml | 2 +- 5 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/integration_test_astro.yml b/.github/workflows/integration_test_astro.yml index b2dfe4370..e4c53ef2c 100644 --- a/.github/workflows/integration_test_astro.yml +++ b/.github/workflows/integration_test_astro.yml @@ -4,6 +4,8 @@ on: push: branches: - main + schedule: + - cron: '0 0 * * *' # end of each day (UTC) pull_request: env: diff --git a/.github/workflows/integration_test_cra.yml b/.github/workflows/integration_test_cra.yml index b95548140..cff9c20d3 100644 --- a/.github/workflows/integration_test_cra.yml +++ b/.github/workflows/integration_test_cra.yml @@ -4,6 +4,8 @@ on: push: branches: - main + schedule: + - cron: '0 0 * * *' # end of each day (UTC) pull_request: env: diff --git a/.github/workflows/integration_test_nextjs.yml b/.github/workflows/integration_test_nextjs.yml index 238797fc7..82556c990 100644 --- a/.github/workflows/integration_test_nextjs.yml +++ b/.github/workflows/integration_test_nextjs.yml @@ -4,6 +4,8 @@ on: push: branches: - main + schedule: + - cron: '0 0 * * *' # end of each day (UTC) pull_request: env: diff --git a/.github/workflows/integration_test_remix.yml b/.github/workflows/integration_test_remix.yml index 851789470..77b97eddf 100644 --- a/.github/workflows/integration_test_remix.yml +++ b/.github/workflows/integration_test_remix.yml @@ -4,6 +4,8 @@ on: push: branches: - main + schedule: + - cron: '0 0 * * *' # end of each day (UTC) pull_request: env: diff --git a/.github/workflows/release_canary.yml b/.github/workflows/release_canary.yml index 72c612440..c4f0827ea 100644 --- a/.github/workflows/release_canary.yml +++ b/.github/workflows/release_canary.yml @@ -8,7 +8,7 @@ on: jobs: release-canary: - if: false + if: ${{ github.repository == 'primer/brand' }} name: Canary runs-on: ubuntu-latest steps: