-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (45 loc) · 1.65 KB
/
lint-test.yml
File metadata and controls
53 lines (45 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Lint and test
env:
VITE_STREAM_API_KEY: ${{ vars.CLIENT_TEST_API_KEY }}
VITE_STREAM_API_SECRET: ${{ secrets.CLIENT_TEST_SECRET }}
VITE_API_URL: ${{ vars.CLIENT_TEST_API_URL }}
on:
push:
branches:
- main
pull_request:
types: [opened, edited, synchronize, reopened]
jobs:
lint-and-test:
timeout-minutes: 30
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [22.x]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- name: Install Dependencies
run: yarn install --immutable
- name: Lint Packages
run: yarn lint:all
- name: Build packages
run: NODE_ENV=production yarn build:libs
- name: Test packages
run: yarn test:ci:libs
- name: Deploy React tutorial to Vercel
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ vars.VERCEL_PROJECT_ID }}
NEXT_PUBLIC_API_KEY: ${{ vars.REACT_TUTORIAL_API_KEY }}
NEXT_PUBLIC_TOKEN_URL: ${{ vars.REACT_TUTORIAL_TOKEN_URL }}
run: >
yarn vercel pull --yes --environment=${{ github.ref == 'refs/heads/main' && 'production' || 'preview' }} --token=${{ secrets.VERCEL_TOKEN }} &&
yarn vercel build ${{ github.ref == 'refs/heads/main' && '--prod' || '' }} --token=${{ secrets.VERCEL_TOKEN }} &&
yarn vercel deploy ${{ github.ref == 'refs/heads/main' && '--prod' || '' }} --prebuilt --token=${{ secrets.VERCEL_TOKEN }}