2024-10-01 16:18:51 +08:00
|
|
|
name: 🧑🚀 Check
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
- next
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
- next
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
vitest:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
name: ⚡ Testing with Vitest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
|
|
|
|
- name: Setup pnpm 9
|
|
|
|
uses: pnpm/action-setup@v4
|
|
|
|
with:
|
|
|
|
version: 9
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: pnpm install
|
|
|
|
|
|
|
|
- name: Run Vitest
|
|
|
|
run: pnpm test
|
|
|
|
|
|
|
|
svgs-size:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
name: 📦 SVGs Size
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
|
|
|
|
- name: Setup pnpm 9
|
|
|
|
uses: pnpm/action-setup@v4
|
|
|
|
with:
|
|
|
|
version: 9
|
|
|
|
|
|
|
|
- name: Install utility dependencies
|
|
|
|
run: pnpm install
|
|
|
|
working-directory: ./utils/check-size
|
|
|
|
|
|
|
|
- name: Check svgs size
|
|
|
|
run: pnpm start
|
|
|
|
working-directory: ./utils/check-size
|
|
|
|
|
|
|
|
build-app:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
name: 🛠️ Build app
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
|
|
|
|
- name: Setup pnpm 9
|
|
|
|
uses: pnpm/action-setup@v4
|
|
|
|
with:
|
|
|
|
version: 9
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: pnpm install
|
|
|
|
|
|
|
|
- name: Build app
|
2024-10-01 17:53:47 +08:00
|
|
|
run: pnpm vite:build
|
2024-10-01 18:05:58 +08:00
|
|
|
env:
|
|
|
|
UPSTASH_REDIS_TOKEN: ${{ secrets.UPSTASH_REDIS_TOKEN }}
|
|
|
|
UPSTASH_REDIS_URL: ${{ secrets.UPSTASH_REDIS_URL }}
|
|
|
|
SVGL_API_REQUESTS: ${{ secrets.SVGL_API_REQUESTS }}
|