-
Notifications
You must be signed in to change notification settings - Fork 15
71 lines (64 loc) · 1.96 KB
/
frontend-ci.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
name: Frontend CI
on:
pull_request: ~
push:
branches:
- "main"
- "hotfix/**"
workflow_dispatch:
inputs:
debug_enabled:
type: boolean
description: "Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)"
required: false
default: false
env:
NEXT_PUBLIC_ENV: local
NEXT_PUBLIC_LANGUAGES_FILTER: CSS,Dockerfile,Handlebars,HTML,Jupyter Notebook,Makefile,Nix,SCSS,Shell
NODE_OPTIONS: --max_old_space_size=4096
NEXT_PUBLIC_USE_APOLLO: "true"
NEXT_PUBLIC_ONLYDUST_API_BASEPATH: "develop-api.onlydust.com"
NEXT_PUBLIC_METADATA_ASSETS_S3_BUCKET: "https://od-metadata-assets-develop.s3.eu-west-1.amazonaws.com"
jobs:
dependencies:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: "yarn"
- run: yarn install --frozen-lockfile
- run: yarn dependency-cruiser
lint:
needs: "dependencies"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: "yarn"
- run: yarn install --frozen-lockfile --prefer-offline
- run: yarn lint
test:
needs: "dependencies"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: yarn install --frozen-lockfile --prefer-offline
- name: Run unit/integration test
run: yarn test --coverage
- name: Setup tmate session for debugging
uses: mxschmitt/action-tmate@v3
if: ${{ failure() && inputs.debug_enabled }}
- name: Upload unit/integration tests coverage
uses: codecov/codecov-action@v4
with:
files: coverage/clover.xml
token: ${{ secrets.CODECOV_TOKEN }}
- name: Clean coverage
run: rm -rf coverage