-
Notifications
You must be signed in to change notification settings - Fork 141
52 lines (51 loc) · 1.58 KB
/
workflow.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
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12.1'
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '18.17.1'
- name: Install chromedriver
uses: nanasess/setup-chromedriver@master
- name: Install Python and JS dependencies
run: ./scripts/install_deps.sh
- name: Build
id: build
env:
REACT_APP_SENTRY_DSN: https://[email protected]/5824691
REACT_APP_USE_FIREBASE_EMULATORS: '1'
REACT_APP_FIREBASE_STAGING: '1'
FUTURECODER_LANGUAGE: en
run: ./scripts/build.sh
- name: Test
env:
FUTURECODER_LANGUAGE: en
FIREBASE_TOKEN: '1//03I37hFeN4kn3CgYIARAAGAMSNwF-L9IrUvqofZbhOkS8YMtQBhw_bu2TpWYC5MHvnaZDsWPP0KJMypXPyoxogkl8A6p2RxPJQwQ'
run: ./scripts/ci_test.sh
- name: Upload test artifacts
uses: actions/upload-artifact@v4
if: steps.build.outcome == 'success'
with:
path: '**/test_frontend_assets/'
- name: Deploy preview
uses: FirebaseExtended/action-hosting-deploy@v0
if: steps.build.outcome == 'success' && github.ref != 'refs/heads/master'
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT }}'
projectId: futurecoder-staging
channelId: ${{ github.ref }}