-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (61 loc) · 1.97 KB
/
ci.yml
File metadata and controls
73 lines (61 loc) · 1.97 KB
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
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
paths-ignore:
- "**/*.md"
- "LICENSE"
- ".gitignore"
- ".husky/**"
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
build-test:
runs-on: ubuntu-latest
steps:
- name: Checkout (full history for SPDX year ranges)
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Install dependencies
run: npm ci || npm i
# If you prefer hardcoding owner/start, keep your old command.
# Here we rely on package.json "config" or env vars (COPYRIGHT_OWNER, COPYRIGHT_START, SPDX_ID)
- name: Check SPDX headers
run: node tools/copyright-headers.mjs --check
- name: Lint
run: npm run lint -- --ext .js,.jsx
- name: Tests
env:
CI: true
run: npm run test:ci
- name: Build (CRA)
env:
CI: true
REACT_APP_APP_NAME: AspectReact Store
REACT_APP_DEFAULT_LOCALE: ${{ vars.REACT_APP_DEFAULT_LOCALE || 'en-US' }}
REACT_APP_CURRENCY: ${{ vars.REACT_APP_CURRENCY || 'USD' }}
REACT_APP_ENABLE_TOASTS: ${{ vars.REACT_APP_ENABLE_TOASTS || 'true' }}
REACT_APP_AUTH_MODE: ${{ vars.REACT_APP_AUTH_MODE || 'none' }}
REACT_APP_API_BASE_URL: ${{ vars.REACT_APP_API_BASE_URL || '' }}
REACT_APP_AUTH0_DOMAIN: ${{ secrets.REACT_APP_AUTH0_DOMAIN }}
REACT_APP_AUTH0_CLIENT_ID: ${{ secrets.REACT_APP_AUTH0_CLIENT_ID }}
REACT_APP_SUPPORT_EMAIL: ${{ vars.REACT_APP_SUPPORT_EMAIL || 'support@yourdomain.com' }}
run: npm run build
- name: Upload production build
uses: actions/upload-artifact@v4
with:
name: build
path: build
retention-days: 7