Skip to content

chore: Update design system and use new color scale #478

chore: Update design system and use new color scale

chore: Update design system and use new color scale #478

Workflow file for this run

name: CI
on:
pull_request:
branches:
- main
paths:
- '**.js'
- '**.jsx'
- '**.ts'
- '**.tsx'
- '**.yml'
- '**.json'
concurrency:
group: ${{ github.head_ref }}
cancel-in-progress: true
jobs:
install-cache:
runs-on: ubuntu-latest
steps:
- name: Checkout Commit
uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: '18.16.0'
- name: Cache yarn dependencies
uses: actions/cache@v3
id: cache-dependencies
with:
path: node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Cache Cypress binary
id: cache-cypress-binary
uses: actions/cache@v3
with:
path: ~/.cache/Cypress
key: cypress-binary-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
cypress-binary-
- name: Install Dependencies
if: steps.cache-dependencies.outputs.cache-hit != 'true' || steps.cache-cypress-binary.outputs.cache-hit != 'true'
run: |
yarn install --force --non-interactive
lint-format:
runs-on: ubuntu-latest
needs: install-cache
steps:
- name: Checkout Commit
uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: '18.16.0'
- name: Restore yarn dependencies
uses: actions/cache@v3
id: cache-dependencies
with:
path: node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Run lint
run: |
yarn lint
- name: Run prettier
run: |
yarn format
type-check:
runs-on: ubuntu-latest
needs: install-cache
steps:
- name: Checkout Commit
uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: '18.16.0'
- name: Restore yarn dependencies
uses: actions/cache@v3
id: cache-dependencies
with:
path: node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Check types
run: |
yarn type-check
unit-test:
runs-on: ubuntu-latest
needs: install-cache
steps:
- name: Checkout Commit
uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: '18.16.0'
- name: Restore yarn dependencies
uses: actions/cache@v3
id: cache-dependencies
with:
path: node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Run test
run: |
yarn test
build:
runs-on: ubuntu-latest
needs: [lint-format, type-check, unit-test]
steps:
- name: Checkout Commit
uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: '18.16.0'
- name: Restore yarn dependencies
uses: actions/cache@v3
id: cache-dependencies
with:
path: node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Run build
run: |
npx playwright install && yarn build
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: build-output
path: .next
retention-days: 1
e2e-tests-chrome:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout Commit
uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: '18.16.0'
- name: Restore yarn dependencies
uses: actions/cache@v3
id: cache-dependencies
with:
path: node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Restore Cypress binary
id: cache-cypress-binary
uses: actions/cache@v3
with:
path: ~/.cache/Cypress
key: cypress-binary-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
cypress-binary-
- name: Download build artifacts
uses: actions/download-artifact@v3
with:
name: build-output
path: .next
- name: Run cypress
uses: cypress-io/[email protected]
with:
start: yarn start
browser: chrome
install: false
- name: Upload Screenshots
uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-screenshots
path: cypress/screenshots
if-no-files-found: ignore
- name: Upload Videos
uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-videos
path: cypress/videos
if-no-files-found: ignore
e2e-tests-firefox:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout Commit
uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: '18.16.0'
- name: Restore yarn dependencies
uses: actions/cache@v3
id: cache-dependencies
with:
path: node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Restore Cypress binary
id: cache-cypress-binary
uses: actions/cache@v3
with:
path: ~/.cache/Cypress
key: cypress-binary-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
cypress-binary-
- name: Download build artifacts
uses: actions/download-artifact@v3
with:
name: build-output
path: .next
- name: Run cypress
uses: cypress-io/[email protected]
with:
start: yarn start
browser: firefox
install: false
- name: Upload Screenshots
uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-screenshots
path: cypress/screenshots
if-no-files-found: ignore
- name: Upload Videos
uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-videos
path: cypress/videos
if-no-files-found: ignore