-
Notifications
You must be signed in to change notification settings - Fork 1
106 lines (87 loc) · 2.76 KB
/
validate-app.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: Validate app
on:
pull_request:
branches:
- main
- develop
paths:
- .github/workflows/validate-app.yml
- app/**
jobs:
lint:
runs-on: ubuntu-24.04
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
node-version-file: "app/.nvmrc"
- uses: actions/[email protected]
id: node-modules-cache
with:
path: app/node_modules
key: ${{ runner.os }}-${{ hashFiles('app/.nvmrc', 'app/package-lock.json', 'app/prisma/prisma.schema') }}
- name: Install dependencies
run: npm ci
working-directory: app
if: steps.node-modules-cache.outputs.cache-hit != 'true'
- name: Lint
run: npm run lint
working-directory: app
continue-on-error: true
env:
DATABASE_URL: "mysql://foo"
NEXTAUTH_SECRET: "foo"
NEXTAUTH_URL: "https://foo"
DISCORD_CLIENT_ID: "foo"
DISCORD_CLIENT_SECRET: "foo"
DISCORD_GUILD_ID: "foo"
DISCORD_TOKEN: "foo"
NEXT_PUBLIC_ALGOLIA_APP_ID: "foo"
ALGOLIA_ADMIN_API_KEY: "foo"
NEXT_PUBLIC_ALGOLIA_SEARCH_API_KEY: "foo"
R2_ACCOUNT_ID: "foo"
R2_ACCESS_KEY_ID: "foo"
R2_SECRET_ACCESS_KEY: "foo"
R2_BUCKET_NAME: "foo"
NEXT_PUBLIC_R2_PUBLIC_URL: "foo"
UNLEASH_SERVER_API_URL: "https://foo"
UNLEASH_SERVER_API_TOKEN: "foo"
prettier:
runs-on: ubuntu-24.04
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
node-version-file: "app/.nvmrc"
- uses: actions/[email protected]
id: node-modules-cache
with:
path: app/node_modules
key: ${{ runner.os }}-${{ hashFiles('app/.nvmrc', 'app/package-lock.json', 'app/prisma/prisma.schema') }}
- name: Install dependencies
run: npm ci
working-directory: app
if: steps.node-modules-cache.outputs.cache-hit != 'true'
- name: Prettier
run: npx prettier --check .
working-directory: app
continue-on-error: true
test:
runs-on: ubuntu-24.04
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
node-version-file: "app/.nvmrc"
- uses: actions/[email protected]
id: node-modules-cache
with:
path: app/node_modules
key: ${{ runner.os }}-${{ hashFiles('app/.nvmrc', 'app/package-lock.json', 'app/prisma/prisma.schema') }}
- name: Install dependencies
run: npm ci
working-directory: app
if: steps.node-modules-cache.outputs.cache-hit != 'true'
- name: Test
run: npm run test
working-directory: app