-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (41 loc) · 1.24 KB
/
pr-tests.yml
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
name: 'PR Tests'
on:
pull_request:
branches: [main, develop]
jobs:
pr-lint-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- uses: pnpm/action-setup@v2
with:
version: 7.0.1
- uses: actions/setup-node@v4
with:
node-version: 16.15.0
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Set environment variables
run: echo ${{ secrets.TEST_APP_ENV }} | openssl base64 -d -A -out .env
- name: Run lint and type checks
run: |
pnpm concurrently -g \
"pnpm lint" \
"pnpm check:types" \
"pnpm prettier --check --ignore-unknown ./" \
"pnpm cspell ./ --no-progress --no-must-find-files"
pr-deploy-preview:
if: github.event.pull_request.base.ref == 'develop'
needs: [pr-lint-and-test]
uses: ./.github/workflows/deploy-action.yml
with:
environment: dev
branch: ${{ github.ref }}
secrets:
app_env: ${{ secrets.APP_ENV }}
vercel_token: ${{ secrets.VERCEL_TOKEN }}
org_id: ${{ secrets.VERCEL_ORG_ID }}
project_id: ${{ secrets.VERCEL_PROJECT_ID }}