-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (45 loc) · 1.58 KB
/
Interlinked.yml
File metadata and controls
53 lines (45 loc) · 1.58 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
name: Interlinked CI
on:
push:
branches: [main, production]
pull_request:
branches: [main, production]
env:
CI: '' # Use this because otherwise warnings will make the pipeline fail
FIREBASE_TOKEN: ${{secrets.FIREBASE_TOKEN}}
NEXT_PUBLIC_FIREBASE_API_KEY: ${{secrets.REACT_APP_FIREBASE_API_KEY}}
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN: ${{secrets.REACT_APP_FIREBASE_AUTH_DOMAIN}}
NEXT_PUBLIC_FIREBASE_PROJECT_ID: ${{secrets.REACT_APP_FIREBASE_PROJECT_ID}}
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET: ${{secrets.REACT_APP_FIREBASE_STORAGE_BUCKET}}
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID: ${{secrets.REACT_APP_FIREBASE_MESSAGING_SENDER_ID}}
NEXT_PUBLIC_FIREBASE_APP_ID: ${{secrets.REACT_APP_FIREBASE_APP_ID}}
NEXT_PUBLIC_EMULATOR: true
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js for Frontend ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: package-lock.json
- name: Firebase setup
run: |
npm i -g firebase-tools
- name: Run Next tests & test coverage
run: |
npm ci
npm run test:coverage
- name: Run app for Cypress
run: |
npm run build:instrumented
npm run start:instrumented &
- name: Run e2e tests & coverage
run: |
npx cypress run --spec cypress/e2e/all.cy.js
npx nyc report --reporter=text-summary