-
Notifications
You must be signed in to change notification settings - Fork 1.7k
100 lines (93 loc) · 4.13 KB
/
verify_pull_request.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
name: verify_pull_request
on:
pull_request:
branches:
- 'development'
jobs:
merge_build_and_unit_test:
runs-on: ubuntu-latest
steps:
- name: Checkout development branch of origin
uses: actions/checkout@v4
with:
repository: Dash-Industry-Forum/dash.js
ref: development
- name: Merge to development
run: |
git config --global user.name "GitHub Action"
git config --global user.email "action@github.com"
git fetch origin pull/${{ github.event.pull_request.number }}/head:pr-branch
git merge pr-branch --no-ff
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 'latest'
cache: 'npm'
- name: Cache node modules
id: cache-npm
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }}
name: List the state of node modules
continue-on-error: true
run: npm list
- run: npm install
- run: tsc
- run: npm run lint
- run: npm run test
- run: npm run webpack-build
run_functional_test_single_stream_lambdatest:
if: github.event.pull_request.head.repo.fork == false
runs-on: ubuntu-latest
steps:
- name: Checkout development branch of origin
uses: actions/checkout@v4
with:
repository: Dash-Industry-Forum/dash.js
ref: development
- name: Merge to development
run: |
git config --global user.name "GitHub Action"
git config --global user.email "action@github.com"
git fetch origin pull/${{ github.event.pull_request.number }}/head:pr-branch
git merge pr-branch --no-ff
- name: Cache node modules
id: cache-npm
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }}
name: List the state of node modules
continue-on-error: true
run: npm list
- run: npm install
- run: npm run webpack-build
- name: Start Tunnel
uses: LambdaTest/LambdaTest-tunnel-action@v2
id: tunnel
with:
user: ${{ secrets.LT_USERNAME }}
accessKey: ${{ secrets.LT_ACCESS_KEY }}
tunnelName: "dashjs-tunnel-${{github.run_number}}"
- name: Run functional tests for a single vector on Lambdatest
env:
LT_USERNAME: ${{ secrets.LT_USERNAME }}
LT_ACCESS_KEY: ${{ secrets.LT_ACCESS_KEY }}
run: node_modules/karma/bin/karma start test/functional/config/karma.functional.conf.cjs --configfile=lambdatest --streamsfile=single