From d55e750ecd9bfb2a1ad51c2f55f75b75825fdaaa Mon Sep 17 00:00:00 2001 From: konnorrogers Date: Mon, 9 Dec 2024 13:04:59 -0500 Subject: [PATCH 1/2] run ssr only on next push --- .github/workflows/client_tests.js.yml | 39 +++++++++++++++++++ .../{node.js.yml => ssr_tests.js.yml} | 32 +-------------- 2 files changed, 41 insertions(+), 30 deletions(-) create mode 100644 .github/workflows/client_tests.js.yml rename .github/workflows/{node.js.yml => ssr_tests.js.yml} (58%) diff --git a/.github/workflows/client_tests.js.yml b/.github/workflows/client_tests.js.yml new file mode 100644 index 000000000..136318b32 --- /dev/null +++ b/.github/workflows/client_tests.js.yml @@ -0,0 +1,39 @@ +# # This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node +# # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions + +name: Client Tests + +on: + push: + branches: [next] + pull_request: + branches: [next] + +jobs: + client_test: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [20.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + + - name: Install dependencies + run: npm ci + - name: Lint + run: npm run prettier && npm run lint + - name: Build + run: npm run build + - name: Install Playwright + run: npx playwright install --with-deps + - name: Run CSR tests + # FAIL_FAST to fail on first failing test. + run: FAIL_FAST="true" CSR_ONLY="true" npm run test diff --git a/.github/workflows/node.js.yml b/.github/workflows/ssr_tests.js.yml similarity index 58% rename from .github/workflows/node.js.yml rename to .github/workflows/ssr_tests.js.yml index 565f2252a..1d7273d9c 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/ssr_tests.js.yml @@ -1,42 +1,14 @@ # # This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node # # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions -name: Node.js CI +name: SSR Tests on: push: branches: [next] - pull_request: - branches: [next] + pull_request: {} jobs: - client_test: - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [20.x] - # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ - - steps: - - uses: actions/checkout@v4 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node-version }} - cache: 'npm' - - - name: Install dependencies - run: npm ci - - name: Lint - run: npm run prettier && npm run lint - - name: Build - run: npm run build - - name: Install Playwright - run: npx playwright install --with-deps - - name: Run CSR tests - # FAIL_FAST to fail on first failing test. - run: FAIL_FAST="true" CSR_ONLY="true" npm run test ssr_test: runs-on: ubuntu-latest From 911668617b19e56d6e2947319a4f54e936549807 Mon Sep 17 00:00:00 2001 From: konnorrogers Date: Mon, 9 Dec 2024 13:35:31 -0500 Subject: [PATCH 2/2] only on push --- .github/workflows/ssr_tests.js.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ssr_tests.js.yml b/.github/workflows/ssr_tests.js.yml index 1d7273d9c..10b9dc248 100644 --- a/.github/workflows/ssr_tests.js.yml +++ b/.github/workflows/ssr_tests.js.yml @@ -6,7 +6,6 @@ name: SSR Tests on: push: branches: [next] - pull_request: {} jobs: ssr_test: