forked from LimeSurvey/LimeSurvey
-
Notifications
You must be signed in to change notification settings - Fork 0
106 lines (87 loc) · 2.93 KB
/
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
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# This workflow will prepare and test the frontend
name: LimeSurvey - Frontend - CI pipeline
# Triggers the workflow on push or pull request events on all branches
on:
pull_request:
push:
branches:
- '*'
- '**'
- 'dev/**'
- 'bug/**'
- 'feature/**'
- 'zoho/**'
jobs:
job_build_packages:
runs-on: ubuntu-20.04 # ubuntu runner hosted by Github
strategy:
matrix:
# Specify what version of nodejs you want to test
nodeJS-versions: ['10.16.3']
name: Build Frontend Packages
steps:
- name: Checkout the code
uses: actions/checkout@v2
- name: Run composer
run: |
composer install -vvv
- name: Run yarn
run: |
yarn install
- name: Prepare nvm with Node ${{ matrix.nodeJS-versions }}
run: |
# Update
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
source ~/.nvm/nvm.sh
# Install Node.js
nvm install ${{ matrix.nodeJS-versions }}
nvm use ${{ matrix.nodeJS-versions }}
- name: Install adminbasics
run: |
cd ${{ github.workspace }}
yarn --cwd ./assets/packages/adminbasics
- name: Build adminbasics
run: |
cd ${{ github.workspace }}
yarn --cwd ./assets/packages/adminbasics build
# - name: Install adminsidepanel
# run: |
# cd ${{ github.workspace }}
# yarn --cwd ./assets/packages/adminsidepanel
# TODO: Enable this step, when its possible to build adminsidepanel again
# - name: Build adminsidepanel
# run: |
# cd ${{ github.workspace }}
# yarn --cwd ./assets/packages/adminsidepanel build
job_run_tests:
needs: [job_build_packages]
runs-on: ubuntu-20.04 # ubuntu runner hosted by Github
strategy:
matrix:
# Specify what version of nodejs you want to test
nodeJS-versions: ['10.16.3']
name: Run Frontend Tests
steps:
- name: Checkout the code
uses: actions/checkout@v2
- name: Prepare nvm with Node ${{ matrix.nodeJS-versions }}
run: |
# Update
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
source ~/.nvm/nvm.sh
# Install Node.js
nvm install ${{ matrix.nodeJS-versions }}
nvm use ${{ matrix.nodeJS-versions }}
- name: Install adminbasics
run: |
cd ${{ github.workspace }}
yarn --cwd ./assets/packages/adminbasics
# - name: Install adminsidepanel
# run: |
# cd ${{ github.workspace }}
# yarn --cwd ./assets/packages/adminsidepanel
- name: Run Tests
run: |
cd ${{ github.workspace }}
yarn --cwd ./assets/packages/adminbasics run test
# yarn --cwd ./assets/packages/adminsidepanel run test