-
Notifications
You must be signed in to change notification settings - Fork 54
57 lines (54 loc) · 1.66 KB
/
frontend.yaml
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
on:
pull_request:
merge_group:
push:
branches:
- master
name: Frontend linting, type check & unit tests
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
install-and-test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: frontend
steps:
- uses: actions/checkout@v4
- name: Restore dependencies from cache
uses: actions/cache/restore@v3
with:
path: ~/.npm
key: npm-${{ hashFiles('package-lock.json') }}
restore-keys: npm-
- name: Restore Turborepo files from cache
uses: actions/cache/restore@v3
with:
path: frontend/.turbo
key: ${{ runner.os }}-turbo-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-
- uses: actions/setup-node@v3
with:
node-version: "18.17.1"
- name: Build frontend
run: npm run build:ci
env:
NODE_ENV: ci
USERGEEK_APIKEY: DUMMY_USERGEEK_APIKEY
ROLLBAR_ACCESS_TOKEN: DUMMY_ROLLBAR_ACCESS_TOKEN
OPENCHAT_WEBSITE_VERSION: 1.0.0
METERED_APIKEY: DUMMY_METERED_APIKEY
- name: Save dependencies to cache
if: ${{ github.ref == 'refs/heads/master' }}
uses: actions/cache/save@v3
with:
path: ~/.npm
key: npm-${{ hashFiles('package-lock.json') }}
- name: Save Turborepo files to cache
if: ${{ github.ref == 'refs/heads/master' }}
uses: actions/cache/save@v3
with:
path: frontend/.turbo
key: ${{ runner.os }}-turbo-${{ github.sha }}