From f06bf2336df268eb8af17105bff141d04c70ac9f Mon Sep 17 00:00:00 2001 From: Francis Anthony Date: Sun, 16 Jun 2024 13:01:38 +0800 Subject: [PATCH] Update test.yml fixes #119 --- .github/workflows/test.yml | 118 ++++++++++++++++++------------------- 1 file changed, 59 insertions(+), 59 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 596bfa7c..dc1093a4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -55,62 +55,62 @@ jobs: build: npm run build start: npm start # Run interaction and accessibility tests - interaction-and-accessibility: - timeout-minutes: 60 - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: "latest" - - uses: actions/cache@v4 - id: cache-npm - with: - path: | - ~/.npm - ${{ github.workspace }}/.next/cache - key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }} - restore-keys: | - ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}- - - if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }} - name: List the state of node_modules - continue-on-error: true - run: npm list - - name: Clean install packages - run: npm ci --ignore-scripts - - name: Install Playwright - run: npx playwright install --with-deps - - name: Build Storybook - run: npm run build-storybook --quiet - - name: Serve Storybook and run tests - run: | - npx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \ - "npx http-server storybook-static --port 6006 --silent" \ - "npx wait-on http://127.0.0.1:6006 && npm run test-storybook" - # Run visual and composition tests with Chromatic - visual-and-composition: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 # Required to retrieve git history - - uses: actions/cache@v4 - id: cache-npm - with: - path: | - ~/.npm - ${{ github.workspace }}/.next/cache - key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }} - restore-keys: | - ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}- - - if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }} - name: List the state of node_modules - continue-on-error: true - run: npm list - - name: Clean install packages - run: npm ci --ignore-scripts - - name: Publish to Chromatic - uses: chromaui/action@v1 - with: - # Grab this from the Chromatic manage page - projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} + # interaction-and-accessibility: + # timeout-minutes: 60 + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v4 + # - uses: actions/setup-node@v4 + # with: + # node-version: "latest" + # - uses: actions/cache@v4 + # id: cache-npm + # with: + # path: | + # ~/.npm + # ${{ github.workspace }}/.next/cache + # key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }} + # restore-keys: | + # ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}- + # - if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }} + # name: List the state of node_modules + # continue-on-error: true + # run: npm list + # - name: Clean install packages + # run: npm ci --ignore-scripts + # - name: Install Playwright + # run: npx playwright install --with-deps + # - name: Build Storybook + # run: npm run build-storybook --quiet + # - name: Serve Storybook and run tests + # run: | + # npx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \ + # "npx http-server storybook-static --port 6006 --silent" \ + # "npx wait-on http://127.0.0.1:6006 && npm run test-storybook" + # # Run visual and composition tests with Chromatic + # visual-and-composition: + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v4 + # with: + # fetch-depth: 0 # Required to retrieve git history + # - uses: actions/cache@v4 + # id: cache-npm + # with: + # path: | + # ~/.npm + # ${{ github.workspace }}/.next/cache + # key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }} + # restore-keys: | + # ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}- + # - if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }} + # name: List the state of node_modules + # continue-on-error: true + # run: npm list + # - name: Clean install packages + # run: npm ci --ignore-scripts + # - name: Publish to Chromatic + # uses: chromaui/action@v1 + # with: + # # Grab this from the Chromatic manage page + # projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}