Update CNAME #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: π€ CI | |
on: [push] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
CI: true | |
jobs: | |
prettier: | |
name: π ΏοΈ Prettier | |
runs-on: ubuntu-latest | |
steps: | |
- name: β¬οΈ Checkout repo | |
uses: actions/checkout@v4 | |
- name: β Setup node | |
uses: actions/setup-node@v4 | |
with: | |
cache: npm | |
node-version-file: '.nvmrc' | |
- name: π₯ Install deps | |
run: npm install | |
- name: π Format check | |
run: npm run format:check | |
lint: | |
name: ⬣ ESLint | |
runs-on: ubuntu-latest | |
steps: | |
- name: β¬οΈ Checkout repo | |
uses: actions/checkout@v4 | |
- name: β Setup node | |
uses: actions/setup-node@v4 | |
with: | |
cache: npm | |
node-version-file: '.nvmrc' | |
- name: π₯ Install deps | |
run: npm install | |
- name: π¬ Lint | |
run: npm run lint | |
typecheck: | |
name: Κ¦ TypeScript | |
runs-on: ubuntu-latest | |
steps: | |
- name: β¬οΈ Checkout repo | |
uses: actions/checkout@v4 | |
- name: β Setup node | |
uses: actions/setup-node@v4 | |
with: | |
cache: npm | |
node-version-file: '.nvmrc' | |
- name: π₯ Install deps | |
run: npm install | |
- name: π Type check | |
run: npm run typecheck | |
playwright: | |
name: π Playwright | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- name: β¬οΈ Checkout repo | |
uses: actions/checkout@v4 | |
- name: β Setup node | |
uses: actions/setup-node@v4 | |
with: | |
cache: npm | |
node-version-file: '.nvmrc' | |
- name: π₯ Install deps | |
run: npm install | |
- name: βοΈ Build | |
run: npm run build | |
- name: π’ Get Playwright version | |
run: echo "PLAYWRIGHT_VERSION=$(npx playwright --version | tr ' ' '-')" >> $GITHUB_ENV | |
- name: π¦ Cache Playwright binaries | |
id: playwright-cache | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/ms-playwright | |
key: ${{ runner.os }}-playwright-${{ env.PLAYWRIGHT_VERSION }} | |
- name: π₯ Install Playwright Browsers | |
run: npx playwright install --with-deps | |
if: steps.playwright-cache.outputs.cache-hit != 'true' | |
- name: π Playwright tests | |
run: npx playwright test | |
- name: π Upload report | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: playwright-report | |
path: playwright/report/ | |
retention-days: 30 | |
release: | |
name: π Release | |
runs-on: ubuntu-latest | |
needs: [prettier, lint, typecheck, playwright] | |
if: github.ref == 'refs/heads/main' | |
steps: | |
- name: β¬οΈ Checkout repo | |
uses: actions/checkout@v4 | |
- name: β Setup node | |
uses: actions/setup-node@v4 | |
with: | |
cache: npm | |
node-version-file: '.nvmrc' | |
- name: π₯ Install deps | |
run: npm install | |
- name: π Semantic Release | |
run: npx semantic-release | |
env: | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} |