Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
3cece4d2
Unverified
Commit
3cece4d2
authored
Nov 09, 2020
by
JJ Kasper
Committed by
GitHub
Nov 09, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update Azure config (#18931)
parent
9e59a6b5
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
128 additions
and
78 deletions
+128
-78
.eslintignore
.eslintignore
+1
-0
build_test_deploy.yml
.github/workflows/build_test_deploy.yml
+1
-0
.gitignore
.gitignore
+1
-0
.prettierignore
.prettierignore
+2
-1
azure-pipelines.yml
azure-pipelines.yml
+92
-61
run-tests.js
run-tests.js
+22
-7
index.test.js
test/integration/build-output/test/index.test.js
+9
-9
No files found.
.eslintignore
View file @
3cece4d2
...
...
@@ -15,3 +15,4 @@ packages/next-codemod/**/*.js
packages/next-codemod/**/*.d.ts
packages/next-env/**/*.d.ts
test/integration/async-modules/**
test-timings.json
\ No newline at end of file
.github/workflows/build_test_deploy.yml
View file @
3cece4d2
...
...
@@ -15,6 +15,7 @@ jobs:
-
uses
:
actions/checkout@v2
-
run
:
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
-
run
:
yarn install --frozen-lockfile --check-files
-
run
:
node run-tests.js --timings --write-timings -g 1/4
-
uses
:
actions/cache@v2
id
:
cache-build
with
:
...
...
.gitignore
View file @
3cece4d2
...
...
@@ -31,6 +31,7 @@ examples/**/out
examples/**/.env*.local
pr-stats.md
test-timings.json
# Vercel
.vercel
...
...
.prettierignore
View file @
3cece4d2
...
...
@@ -13,4 +13,5 @@ packages/next-codemod/transforms/__testfixtures__/**/*
packages/next-codemod/transforms/__tests__/**/*
packages/next-codemod/**/*.js
packages/next-codemod/**/*.d.ts
packages/next-env/**/*.d.ts
\ No newline at end of file
packages/next-env/**/*.d.ts
test-timings.json
\ No newline at end of file
azure-pipelines.yml
View file @
3cece4d2
...
...
@@ -3,64 +3,95 @@ variables:
NEXT_TELEMETRY_DISABLED
:
'
1'
node_version
:
^10.10.0
jobs
:
-
job
:
test_ie11
pool
:
vmImage
:
'
windows-2019'
steps
:
-
task
:
NodeTool@0
inputs
:
versionSpec
:
$(node_version)
displayName
:
'
Install
Node.js'
-
task
:
CacheBeta@0
inputs
:
key
:
yarn | $(Agent.OS) | yarn.lock
path
:
$(YARN_CACHE_FOLDER)
displayName
:
Cache Yarn packages
-
script
:
|
yarn install --frozen-lockfile --check-files
displayName
:
'
Install
dependencies'
-
script
:
|
yarn testie --forceExit test/integration/production/
displayName
:
'
Run
tests'
-
job
:
test_chrome
pool
:
vmImage
:
'
windows-2019'
strategy
:
maxParallel
:
10
matrix
:
node-10-1
:
group
:
1/4
node-10-2
:
group
:
2/4
node-10-3
:
group
:
3/4
node-10-4
:
group
:
4/4
steps
:
-
script
:
|
wmic datafile where name="C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe" get Version /value
displayName
:
'
List
Chrome
version'
-
task
:
NodeTool@0
inputs
:
versionSpec
:
$(node_version)
displayName
:
'
Install
Node.js'
-
task
:
CacheBeta@0
inputs
:
key
:
yarn | $(Agent.OS) | yarn.lock
path
:
$(YARN_CACHE_FOLDER)
displayName
:
Cache Yarn packages
-
script
:
|
yarn install --frozen-lockfile --check-files
displayName
:
'
Install
dependencies'
-
script
:
|
node run-tests.js -g $(group) --timings --azure
displayName
:
'
Run
tests'
stages
:
-
stage
:
Build
jobs
:
-
job
:
build
pool
:
vmImage
:
'
windows-2019'
steps
:
-
script
:
echo $(Agent.BuildDirectory)
-
script
:
dir
-
script
:
dir $(System.DefaultWorkingDirectory)
-
script
:
echo $(System.pullRequest.sourceCommitId)
-
powershell
:
Set-MpPreference -ExclusionPath $(System.DefaultWorkingDirectory)
-
powershell
:
Set-MpPreference -ExclusionPath $(Pipeline.Workspace)/.yarn
-
powershell
:
Set-MpPreference -DisableIntrusionPreventionSystem $true -DisableIOAVProtection $true -DisableRealtimeMonitoring $true -DisableScriptScanning $true -EnableControlledFolderAccess Disabled -EnableNetworkProtection AuditMode -Force -MAPSReporting Disabled -SubmitSamplesConsent NeverSend
-
powershell
:
Get-MpComputerStatus
-
task
:
NodeTool@0
inputs
:
versionSpec
:
$(node_version)
displayName
:
'
Install
Node.js'
-
task
:
Cache@2
inputs
:
# use deterministic cache key that is specific
# to this test run
key
:
$(System.pullRequest.sourceCommitId)
path
:
$(System.DefaultWorkingDirectory)
displayName
:
Cache Build
-
script
:
|
yarn install --frozen-lockfile --check-files
displayName
:
'
Install
dependencies'
-
script
:
|
node run-tests.js --timings --write-timings --azure -g 1/4
displayName
:
'
Fetch
test
timing
data'
-
stage
:
Test
dependsOn
:
Build
jobs
:
-
job
:
test_ie11
pool
:
vmImage
:
'
windows-2019'
steps
:
-
checkout
:
none
-
powershell
:
Set-MpPreference -ExclusionPath $(System.DefaultWorkingDirectory)
-
powershell
:
Set-MpPreference -ExclusionPath $(Pipeline.Workspace)/.yarn
-
powershell
:
Set-MpPreference -DisableIntrusionPreventionSystem $true -DisableIOAVProtection $true -DisableRealtimeMonitoring $true -DisableScriptScanning $true -EnableControlledFolderAccess Disabled -EnableNetworkProtection AuditMode -Force -MAPSReporting Disabled -SubmitSamplesConsent NeverSend
-
task
:
NodeTool@0
inputs
:
versionSpec
:
$(node_version)
displayName
:
'
Install
Node.js'
-
task
:
Cache@2
inputs
:
# use deterministic cache key that is specific
# to this test run
key
:
$(System.pullRequest.sourceCommitId)
path
:
$(System.DefaultWorkingDirectory)
displayName
:
Cache Build
-
script
:
|
yarn testie --forceExit test/integration/production/
displayName
:
'
Run
tests'
-
job
:
test_chrome
pool
:
vmImage
:
'
windows-2019'
strategy
:
matrix
:
node-10-1
:
group
:
1/4
node-10-2
:
group
:
2/4
node-10-3
:
group
:
3/4
node-10-4
:
group
:
4/4
steps
:
-
checkout
:
none
-
powershell
:
Set-MpPreference -ExclusionPath $(System.DefaultWorkingDirectory)
-
powershell
:
Set-MpPreference -ExclusionPath $(Pipeline.Workspace)/.yarn
-
powershell
:
Set-MpPreference -DisableIntrusionPreventionSystem $true -DisableIOAVProtection $true -DisableRealtimeMonitoring $true -DisableScriptScanning $true -EnableControlledFolderAccess Disabled -EnableNetworkProtection AuditMode -Force -MAPSReporting Disabled -SubmitSamplesConsent NeverSend
-
script
:
|
wmic datafile where name="C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe" get Version /value
displayName
:
'
List
Chrome
version'
-
task
:
NodeTool@0
inputs
:
versionSpec
:
$(node_version)
displayName
:
'
Install
Node.js'
-
task
:
Cache@2
inputs
:
# use deterministic cache key that is specific
# to this test run
key
:
$(System.pullRequest.sourceCommitId)
path
:
$(System.DefaultWorkingDirectory)
displayName
:
Cache Build
-
script
:
|
node run-tests.js -g $(group) --timings --azure
displayName
:
'
Run
tests'
run-tests.js
View file @
3cece4d2
...
...
@@ -22,6 +22,7 @@ const TIMINGS_API = `https://next-timings.jjsweb.site/api/timings`
parseInt
(
process
.
argv
[
concurrencyIdx
+
1
],
10
)
||
DEFAULT_CONCURRENCY
const
outputTimings
=
process
.
argv
.
indexOf
(
'--timings'
)
!==
-
1
const
writeTimings
=
process
.
argv
.
indexOf
(
'--write-timings'
)
!==
-
1
const
isAzure
=
process
.
argv
.
indexOf
(
'--azure'
)
!==
-
1
const
groupIdx
=
process
.
argv
.
indexOf
(
'-g'
)
const
groupArg
=
groupIdx
!==
-
1
&&
process
.
argv
[
groupIdx
+
1
]
...
...
@@ -39,15 +40,29 @@ const TIMINGS_API = `https://next-timings.jjsweb.site/api/timings`
if
(
outputTimings
&&
groupArg
)
{
console
.
log
(
'Fetching previous timings data'
)
try
{
const
timingsRes
=
await
fetch
(
`
${
TIMINGS_API
}
?which=
${
isAzure
?
'azure'
:
'actions'
}
`
)
const
timingsFile
=
path
.
join
(
__dirname
,
'test-timings.json'
)
try
{
prevTimings
=
JSON
.
parse
(
await
fs
.
readFile
(
timingsFile
,
'utf8'
))
console
.
log
(
'Loaded test timings from disk successfully'
)
}
catch
(
_
)
{}
if
(
!
timingsRes
.
ok
)
{
throw
new
Error
(
`request status:
${
timingsRes
.
status
}
`
)
if
(
!
prevTimings
)
{
const
timingsRes
=
await
fetch
(
`
${
TIMINGS_API
}
?which=
${
isAzure
?
'azure'
:
'actions'
}
`
)
if
(
!
timingsRes
.
ok
)
{
throw
new
Error
(
`request status:
${
timingsRes
.
status
}
`
)
}
prevTimings
=
await
timingsRes
.
json
()
console
.
log
(
'Fetched previous timings data successfully'
)
if
(
writeTimings
)
{
await
fs
.
writeFile
(
timingsFile
,
JSON
.
stringify
(
prevTimings
))
console
.
log
(
'Wrote previous timings data to'
,
timingsFile
)
process
.
exit
(
0
)
}
}
prevTimings
=
await
timingsRes
.
json
()
console
.
log
(
'Fetched previous timings data successfully'
)
}
catch
(
err
)
{
console
.
log
(
`Failed to fetch timings data`
,
err
)
}
...
...
test/integration/build-output/test/index.test.js
View file @
3cece4d2
...
...
@@ -91,37 +91,37 @@ describe('Build Output', () => {
}
// should be no bigger than 265 bytes
expect
(
parseFloat
(
indexSize
)
-
26
5
).
toBeLessThanOrEqual
(
0
)
expect
(
parseFloat
(
indexSize
)
-
26
6
).
toBeLessThanOrEqual
(
0
)
expect
(
indexSize
.
endsWith
(
'B'
)).
toBe
(
true
)
// should be no bigger than 60.8 kb
expect
(
parseFloat
(
indexFirstLoad
)
-
61.
3
).
toBeLessThanOrEqual
(
0
)
expect
(
parseFloat
(
indexFirstLoad
)
-
61.
4
).
toBeLessThanOrEqual
(
0
)
expect
(
indexFirstLoad
.
endsWith
(
'kB'
)).
toBe
(
true
)
expect
(
parseFloat
(
err404Size
)
-
3.
5
).
toBeLessThanOrEqual
(
0
)
expect
(
parseFloat
(
err404Size
)
-
3.
6
).
toBeLessThanOrEqual
(
0
)
expect
(
err404Size
.
endsWith
(
'kB'
)).
toBe
(
true
)
expect
(
parseFloat
(
err404FirstLoad
)
-
64.
5
).
toBeLessThanOrEqual
(
0
)
expect
(
parseFloat
(
err404FirstLoad
)
-
64.
6
).
toBeLessThanOrEqual
(
0
)
expect
(
err404FirstLoad
.
endsWith
(
'kB'
)).
toBe
(
true
)
expect
(
parseFloat
(
sharedByAll
)
-
61.
1
).
toBeLessThanOrEqual
(
0
)
expect
(
parseFloat
(
sharedByAll
)
-
61.
2
).
toBeLessThanOrEqual
(
0
)
expect
(
sharedByAll
.
endsWith
(
'kB'
)).
toBe
(
true
)
if
(
_appSize
.
endsWith
(
'kB'
))
{
expect
(
parseFloat
(
_appSize
)).
toBeLessThanOrEqual
(
1.0
1
)
expect
(
parseFloat
(
_appSize
)).
toBeLessThanOrEqual
(
1.0
2
)
expect
(
_appSize
.
endsWith
(
'kB'
)).
toBe
(
true
)
}
else
{
expect
(
parseFloat
(
_appSize
)
-
1000
).
toBeLessThanOrEqual
(
0
)
expect
(
_appSize
.
endsWith
(
' B'
)).
toBe
(
true
)
}
expect
(
parseFloat
(
webpackSize
)
-
75
2
).
toBeLessThanOrEqual
(
0
)
expect
(
parseFloat
(
webpackSize
)
-
75
3
).
toBeLessThanOrEqual
(
0
)
expect
(
webpackSize
.
endsWith
(
' B'
)).
toBe
(
true
)
expect
(
parseFloat
(
mainSize
)
-
7.4
4
).
toBeLessThanOrEqual
(
0
)
expect
(
parseFloat
(
mainSize
)
-
7.4
5
).
toBeLessThanOrEqual
(
0
)
expect
(
mainSize
.
endsWith
(
'kB'
)).
toBe
(
true
)
expect
(
parseFloat
(
frameworkSize
)
-
4
1
).
toBeLessThanOrEqual
(
0
)
expect
(
parseFloat
(
frameworkSize
)
-
4
2
).
toBeLessThanOrEqual
(
0
)
expect
(
frameworkSize
.
endsWith
(
'kB'
)).
toBe
(
true
)
})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment