-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (80 loc) · 2.31 KB
/
pr_checks.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: Run PR checks
run-name: "Checks for PR #${{ github.event.pull_request.number }}"
on:
pull_request:
branches: [main, develop]
permissions:
contents: read
concurrency:
group: checks-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
lint:
name: Run linter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: ${{ vars.NODE_VERSION_STRING }}
- name: Install dependencies
run: |
npm ci
npm ci --prefix 'packages/web'
- name: Lint SST app
run: npm run lint
- name: Lint Next.js site
working-directory: ./packages/web
run: npm run lint
typecheck:
name: Run typechecks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: ${{ vars.NODE_VERSION_STRING }}
- name: Install dependencies
run: |
npm ci
npm ci --prefix 'packages/web'
- name: Typecheck SST app
run: npm run typecheck
- name: Typecheck Next.js site
working-directory: ./packages/web
run: npm run typecheck
buildall:
if: github.actor != 'dependabot[bot]'
name: Non-dependabot build check
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: ${{ vars.NODE_VERSION_STRING }}
- name: Install dependencies
run: |
npm ci
npm ci --prefix 'packages/web'
- uses: aws-actions/configure-aws-credentials@v3
with:
role-to-assume: ${{ secrets.DEV_DEPLOY_ROLE_ARN }}
aws-region: ${{ vars.AWS_REGION }}
mask-aws-account-id: true
- name: Build SST app
run: npx sst build --stage dev
buildsite:
if: github.actor == 'dependabot[bot]'
name: Dependabot build check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: ${{ vars.NODE_VERSION_STRING }}
- name: Install dependencies
run: npm ci --prefix 'packages/web'
- name: Build Next.js site
run: npm run build --prefix 'packages/web'