-
-
Notifications
You must be signed in to change notification settings - Fork 64
40 lines (37 loc) · 1.22 KB
/
Continuous_Integration_Frontend.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
name: CI_Frontend
on:
pull_request:
paths:
- 'client/**'
- '.github/workflows/Continuous_Integration_Frontend.yml'
workflow_dispatch:
defaults:
run:
working-directory: client
jobs:
ci_frontend_build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v3
with:
node-version: 12
- name: Install Packages
run: npm install
- name: Lint
run: npm run lint
- name: Setup environment
run: |
echo VITE_MAPBOX_TOKEN=${{ secrets.VITE_MAPBOX_TOKEN }} > .env
echo MAPBOX_STREETS_URL=${{ secrets.MAPBOX_STREETS_URL }} >> .env
echo MAPBOX_SATELLITE_URL=${{ secrets.MAPBOX_SATELLITE_URL }} >> .env
echo API_URL=${{ secrets.API_URL_PROD }} >> .env
echo REPORT_URL=${{ secrets.REPORT_URL }} >> .env
echo SENTRY_CLIENT_DSN=${{ secrets.SENTRY_CLIENT_DSN }} >> .env
echo MIXPANEL_ENABLED=${{ secrets.MIXPANEL_ENABLED }} >> .env
echo MIXPANEL_TOKEN_PROD=${{ secrets.MIXPANEL_TOKEN_PROD }} >> .env
echo MIXPANEL_TOKEN_DEV=${{ secrets.MIXPANEL_TOKEN_DEV }} >> .env
- name: Build project
run: npm run build
- name: Run Tests
run: npm run test -- --coverage