-
Notifications
You must be signed in to change notification settings - Fork 254
165 lines (147 loc) · 4.62 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
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
name: Scully build, test, package, and deploy
on:
# Trigger the workflow on any updates of the PR, but not on push to main.
# as that would only result in testing code that has just finnished testing
# but only for the main branch
pull_request:
types: [opened, synchronize, reopened, labeled]
jobs:
prepare:
name: Setup Node, install dependencies, and cache node modules, build dist artifacts
runs-on: ubuntu-latest
strategy:
matrix:
node: [16.x, 14.x]
steps:
- name: Checkout branch
uses: actions/checkout@v2
- name: Setup Node, install dependencies, and cache node modules, build dist artifacts
uses: ./.github/build-artifacts
with:
node-version: ${{ matrix.node }}
buildSample:
name: Build Sample-blog
needs: prepare
runs-on: ubuntu-latest
strategy:
matrix:
node: [16.x]
renderer: [sps, ppt, pw]
steps:
- name: Checkout branch
uses: actions/checkout@v2
- name: Setup Node, retrieve node_modules and dist folder from cache
uses: ./.github/build-artifacts
with:
node-version: ${{ matrix.node }}
- name: build sample-blog
run: |
node ./dist/libs/scully/src/scully --tds --project=sample-blog --404=index --scan
env:
SCULLY_VAULT_DEMO_KEY: ${{ secrets.SCULLY_VAULT_DEMO_KEY }}
SCULLY_rnd: ${{ matrix.renderer }}
- name: Store sample-blog
uses: actions/upload-artifact@v2
with:
name: static-sites-sample-${{ matrix.renderer }}
path: dist/static/sample-blog
buildDocs:
name: Build Docs
needs: prepare
runs-on: ubuntu-latest
strategy:
matrix:
node: [16.x]
renderer: [sps, ppt, pw]
steps:
- name: Checkout branch
uses: actions/checkout@v2
- name: Setup Node, retrieve node_modules and dist folder from cache
uses: ./.github/build-artifacts
with:
node-version: ${{ matrix.node }}
- name: build Scully docs site
env:
SCULLY_rnd: ${{ matrix.renderer }}
run: |
node ./dist/libs/scully/src/scully --tds --project=scully-docs --404=index
- name: Store docs-site
uses: actions/upload-artifact@v2
with:
name: static-sites-docs-${{ matrix.renderer }}
path: dist/static/doc-sites
jest-test:
name: Run Jest tests
needs: [buildDocs, buildSample]
runs-on: ubuntu-latest
strategy:
matrix:
node: [16.x]
renderer: [sps, ppt, pw]
steps:
- name: Checkout branch
uses: actions/checkout@v2
- name: Setup Node, retrieve node_modules and dist folder from cache
uses: ./.github/build-artifacts
with:
node-version: ${{ matrix.node }}
- name: Download sample-blog and docs-sites
uses: actions/download-artifact@v2
with:
name: static-sites-docs-${{ matrix.renderer }}
path: dist/static/doc-sites
- uses: actions/download-artifact@v2
with:
name: static-sites-sample-${{ matrix.renderer }}
path: dist/static/sample-blog
- name: Run the tests
run: |
npm run jest:test
env:
CI: true
cypress-test:
name: Run cypres E2E tests
needs: [buildDocs, buildSample]
runs-on: ubuntu-latest
strategy:
matrix:
node: [16.x]
renderer: [sps, ppt, pw]
steps:
- name: Checkout branch
uses: actions/checkout@v2
- name: Setup Node, retrieve node_modules and dist folder from cache
uses: ./.github/build-artifacts
with:
node-version: ${{ matrix.node }}
- name: Download sample-blog and docs-sites
uses: actions/download-artifact@v2
with:
name: static-sites-docs-${{ matrix.renderer }}
path: dist/static/doc-sites
- uses: actions/download-artifact@v2
with:
name: static-sites-sample-${{ matrix.renderer }}
path: dist/static/sample-blog
- name: Run the tests
run: |
node ./dist/libs/scully/src/scully prepServe --project=sample-blog
npm run cypress:e2e:server
env:
CI: true
testnewApp:
name: Test if we can create a new app
needs: [prepare]
runs-on: ubuntu-latest
strategy:
matrix:
node: [16.x, 14.x]
angular: [12, 13]
steps:
- name: Checkout branch
uses: actions/checkout@v2
- name: Run tests
uses: ./.github/test-build
with:
node-version: ${{ matrix.node }}
angular-version: ${{ matrix.angular }}