-
Notifications
You must be signed in to change notification settings - Fork 0
94 lines (81 loc) · 3.18 KB
/
continuous.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
name: continuous
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
name: Quality Gates
steps:
- name: Checkout
uses: actions/checkout@v4
# install node version from .nvmrc
- name: Install Node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
# install deps
- name: Install Dependencies
run: npm ci
# lint all packages
- name: Lint All Packages
run: npm run lint
# build all packages
- name: Build All Packages
run: npm run build
# verify generated bundle sizes for all packages
- name: Verify Bundle Sizes
run: npm run verify:bundle-size
# run unit tests and generate test coverage for all packages
- name: Test All Packages
run: npm run test:coverage
# upload @videojs/hls-parser test coverage to codecov
- name: Upload Hls-Parser Coverage
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: hls-parser
files: ./packages/hls-parser/coverage/coverage-final.json
name: hls-parser-coverage
fail_ci_if_error: true
# upload @videojs/dash-parser test coverage to codecov
- name: Upload Dash-Parser Coverage
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: dash-parser
files: ./packages/dash-parser/coverage/coverage-final.json
name: dash-parser-coverage
fail_ci_if_error: true
# upload @videojs/playback test coverage to codecov
- name: Upload Player Coverage
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: playback
files: ./packages/playback/coverage/coverage-final.json
name: playback-coverage
fail_ci_if_error: true
# left a comment with urls
- name: Left a comment with urls
uses: actions/github-script@v7
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `
> [!NOTE]
>
> URLs will be available only after Netlify deploy is completed
### Preview
https://deploy-preview-${context.issue.number}--videojsdev.netlify.app
### Api References
https://deploy-preview-${context.issue.number}--videojsdev.netlify.app/api-reference/dash-parser
https://deploy-preview-${context.issue.number}--videojsdev.netlify.app/api-reference/hls-parser
https://deploy-preview-${context.issue.number}--videojsdev.netlify.app/api-reference/playback
### Demo
https://deploy-preview-${context.issue.number}--videojsdev.netlify.app/demo/dash-parser
https://deploy-preview-${context.issue.number}--videojsdev.netlify.app/demo/hls-parser
https://deploy-preview-${context.issue.number}--videojsdev.netlify.app/demo/playback
`
})