-
Notifications
You must be signed in to change notification settings - Fork 1
81 lines (67 loc) · 1.74 KB
/
pipeline.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
72
73
74
75
76
77
78
79
80
81
name: Node CI
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
env:
CI: true
GH_REPO: marabesi/testable
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
FIREBASE: ''
REACT_APP_FIREBASE_JSON: ${{ secrets.REACT_APP_FIREBASE_JSON }}
REACT_APP_DEBUG: false
REACT_APP_SHOW_SURVEY: false
REACT_APP_BASE_NAME: ''
REACT_APP_RANKING_API: ${{ secrets.REACT_APP_RANKING_API }}
REACT_APP_HOST: https://marabesi.github.io/testable
CYPRESS_HOST: ''
CYPRESS_EMAIL: ''
CYPRESS_PASSWORD: ''
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./webapp
steps:
- uses: actions/checkout@v1
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: 18
- name: cypress setup
run: |
echo $FIREBASE > src/env.prod.json
echo $FIREBASE > src/env.json
echo "{
\"host\": \"$CYPRESS_HOST\",
\"email\": \"$CYPRESS_EMAIL\",
\"password\": \"$CYPRESS_PASSWORD\"
}" > cypress.env.json
- name: npm install ⌛
run: |
npm install --legacy-peer-deps
- name: npm lint 🤞
run: npm run lint
- name: npm build 🔨
run: |
npm run build
- name: npm coveralls ✅
if: github.ref == 'refs/heads/master'
run: |
npm run coveralls
- name: npm test ✅
if: github.ref != 'refs/heads/master'
run: |
npm run test:ci
- name: Deploy to gh pages 🚀
if: github.ref == 'refs/heads/master'
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: webapp/build