From fbccee19badedb262d1d4b899b584494df2f90ce Mon Sep 17 00:00:00 2001 From: JeremyWuuuuu <15975785+JeremyWuuuuu@users.noreply.github.com> Date: Fri, 18 Mar 2022 21:37:37 +0800 Subject: [PATCH] feat(ci): enable ssr testing in CI (#6710) - Add github action workflow for tesing SSR --- .github/workflows/sst-testing.yml | 46 +++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/sst-testing.yml diff --git a/.github/workflows/sst-testing.yml b/.github/workflows/sst-testing.yml new file mode 100644 index 0000000000..841e37d30b --- /dev/null +++ b/.github/workflows/sst-testing.yml @@ -0,0 +1,46 @@ +# This workflow runs on target, so there is no need to worry about secrets +name: 🧪 SSR Testing + +on: pull_request + +jobs: + # Build successfully, start deployment + test: + name: SSR rendering test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + persist-credentials: false + + - name: Setup pnpm + uses: pnpm/action-setup@v2 + with: + version: latest + + - name: Setup node + uses: actions/setup-node@v3 + with: + node-version: '16' + + - name: Cache ~/.pnpm-store + uses: actions/cache@v2 + env: + cache-name: cache-pnpm-store + with: + path: ~/.pnpm-store + key: ${{ runner.os }}-${{ matrix.node-version }}-test-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-${{ matrix.node-version }}-test-${{ env.cache-name }}- + ${{ runner.os }}-${{ matrix.node-version }}-test- + ${{ runner.os }}- + + - name: Install dependencies + run: pnpm i --frozen-lockfile + + - name: Local build + run: pnpm build + + - name: Do test + run: pnpm test:ssr