refactor(tests): setup basic e2e test #72
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/CD π€π | |
on: | |
push: | |
branches: | |
- main | |
workflow_run: | |
workflows: ['Dependencies Update π€'] | |
types: | |
- completed | |
jobs: | |
CI: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout to the branch π€ | |
uses: actions/checkout@v3 | |
- name: Setup Node π€ | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Setup pnpm π€ | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
run_install: false | |
- name: Install dependencies π€ | |
run: pnpm install | |
- name: Build the code π€ | |
run: pnpm build:web | |
- name: Run unit tests π€ | |
run: pnpm test:unit | |
CD: | |
needs: CI | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout to the branch π | |
uses: actions/checkout@v3 | |
- name: Setup Node π | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Setup pnpm π | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
run_install: false | |
- name: Install dependencies π | |
run: pnpm install | |
- name: Install Vercel CLI π | |
run: pnpm add vercel@latest | |
- name: Pull Vercel Environment Information π | |
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} | |
- name: Build Project Artifacts π | |
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} | |
- name: Deploy Project Artifacts to Vercel π | |
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} |