-
-
Notifications
You must be signed in to change notification settings - Fork 5
64 lines (57 loc) · 2.1 KB
/
build.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
name: 'Code quality & Build'
on:
workflow_dispatch:
push:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Build
run: |
node -v
yarn
yarn prettier
yarn lint
yarn build
yarn test:coverage
yarn type-coverage
env:
GTM_ID: ${{ secrets.GTM_ID }}
MONGODB_URI: ${{ secrets.MONGODB_URI }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }}
LAST_FM_API_KEY: ${{ secrets.LAST_FM_API_KEY }}
NEXT_PUBLIC_GTM_ID: ${{ secrets.GTM_ID }}
CLOUDINARY_API_KEY: ${{ secrets.CLOUDINARY_API_KEY }}
CONTENTFUL_SPACE_ID: ${{ secrets.CONTENTFUL_SPACE_ID }}
CLOUDINARY_API_SECRET: ${{ secrets.CLOUDINARY_API_SECRET }}
CLOUDINARY_CLOUD_NAME: ${{ secrets.CLOUDINARY_CLOUD_NAME }}
CONTENTFUL_ACCESS_TOKEN: ${{ secrets.CONTENTFUL_ACCESS_TOKEN }}
NODE_OPTIONS: '--max_old_space_size=8192'
- name: Upload
uses: actions/upload-artifact@v4
with:
name: coverage
path: coverage/lcov.info
coverage:
needs: build
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [lts/*]
name: codacy-coverage-reporter
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: coverage
path: coverage
- name: Run codacy-coverage-reporter
uses: codacy/codacy-coverage-reporter-action@master
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: coverage/lcov.info