FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
docs/.github/workflows/test.yml at main · untitaker/docs · GitHub
untitaker
/
docs
Public
forked from
github/docs
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
docs
/
.github
/
workflows
/
test.yml
Copy path
View runs
More file actions
More file actions
Latest commit
History
History
History
125 lines (108 loc) · 4.65 KB
Breadcrumbs
docs
/
.github
/
workflows
/
test.yml
Copy path
File metadata and controls
125 lines (108 loc) · 4.65 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
#
NOTE: Changes to this file should also be applied to './test-windows.yml' and './test-translations.yml'
name
:
Node.js Tests
on
:
workflow_dispatch
:
push
:
branches
:
-
main
pull_request
:
branches-ignore
:
-
translations
env
:
CI
:
true
jobs
:
see_if_should_skip
:
continue-on-error
:
true
runs-on
:
ubuntu-latest
#
Map a step output to a job output
outputs
:
should_skip
:
${{ steps.skip_check.outputs.should_skip }}
steps
:
-
id
:
skip_check
uses
:
fkirc/skip-duplicate-actions@36feb0d8d062137530c2e00bd278d138fe191289
with
:
cancel_others
:
'
false
'
github_token
:
${{ github.token }}
paths
:
'
[".github/workflows/test.yml",".node-version", ".npmrc", "app.json", "content/**", "data/**","lib/**", "Dockerfile", "feature-flags.json", "Gemfile", "Gemfile.lock", "middleware/**", "node_modules/**","package.json", "package-lock.json", "server.js", "tests/**", "translations/**", "Procfile", "webpack.config.js"]
'
lint
:
needs
:
see_if_should_skip
runs-on
:
ubuntu-latest
steps
:
#
Each of these ifs needs to be repeated at each step to make sure the required check still runs
#
Even if if doesn't do anything
-
if
:
${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
name
:
Check out repo
uses
:
actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675
-
if
:
${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
name
:
Setup node
uses
:
actions/setup-node@56899e050abffc08c2b3b61f3ec6a79a9dc3223d
with
:
node-version
:
14.x
-
if
:
${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
name
:
Get npm cache directory
id
:
npm-cache
run
:
|
echo "::set-output name=dir::$(npm config get cache)"
-
if
:
${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
name
:
Cache node modules
uses
:
actions/cache@d1255ad9362389eac595a9ae406b8e8cb3331f16
with
:
path
:
${{ steps.npm-cache.outputs.dir }}
key
:
${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys
:
|
${{ runner.os }}-node-
-
if
:
${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
name
:
Install dependencies
run
:
npm ci
-
if
:
${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
name
:
Run linter
run
:
npx standard
-
if
:
${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
name
:
Check dependencies
run
:
npm run check-deps
test
:
needs
:
see_if_should_skip
runs-on
:
ubuntu-latest
strategy
:
fail-fast
:
false
matrix
:
test-group
:
[content, meta, rendering, routing, unit, links-and-images]
steps
:
#
Each of these ifs needs to be repeated at each step to make sure the required check still runs
#
Even if if doesn't do anything
-
if
:
${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
name
:
Check out repo
uses
:
actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675
-
if
:
${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
name
:
Setup node
uses
:
actions/setup-node@56899e050abffc08c2b3b61f3ec6a79a9dc3223d
with
:
node-version
:
14.x
-
if
:
${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
name
:
Get npm cache directory
id
:
npm-cache
run
:
|
echo "::set-output name=dir::$(npm config get cache)"
-
if
:
${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
name
:
Cache node modules
uses
:
actions/cache@d1255ad9362389eac595a9ae406b8e8cb3331f16
with
:
path
:
${{ steps.npm-cache.outputs.dir }}
key
:
${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys
:
|
${{ runner.os }}-node-
-
if
:
${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
name
:
Install dependencies
run
:
npm ci
-
if
:
${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
name
:
Run build script
run
:
npm run build
-
if
:
${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
name
:
Run tests
run
:
npx jest tests/${{ matrix.test-group }}/
-
name
:
Send Slack notification if workflow fails
uses
:
rtCamp/action-slack-notify@e17352feaf9aee300bf0ebc1dfbf467d80438815
if
:
failure() && github.ref == 'early-access'
env
:
SLACK_WEBHOOK
:
${{ secrets.DOCS_ALERTS_SLACK_WEBHOOK }}
SLACK_MESSAGE
:
"
Tests are failing on the `early-access` branch. https://github.com/github/docs-internal/tree/early-access
"
Back
|
FazBrowse Home
|
New Git URL