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
Show 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
...
@@ -15,3 +15,4 @@ packages/next-codemod/**/*.js
packages/next-codemod/**/*.d.ts
packages/next-codemod/**/*.d.ts
packages/next-env/**/*.d.ts
packages/next-env/**/*.d.ts
test/integration/async-modules/**
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:
...
@@ -15,6 +15,7 @@ jobs:
-
uses
:
actions/checkout@v2
-
uses
:
actions/checkout@v2
-
run
:
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
-
run
:
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
-
run
:
yarn install --frozen-lockfile --check-files
-
run
:
yarn install --frozen-lockfile --check-files
-
run
:
node run-tests.js --timings --write-timings -g 1/4
-
uses
:
actions/cache@v2
-
uses
:
actions/cache@v2
id
:
cache-build
id
:
cache-build
with
:
with
:
...
...
.gitignore
View file @
3cece4d2
...
@@ -31,6 +31,7 @@ examples/**/out
...
@@ -31,6 +31,7 @@ examples/**/out
examples/**/.env*.local
examples/**/.env*.local
pr-stats.md
pr-stats.md
test-timings.json
# Vercel
# Vercel
.vercel
.vercel
...
...
.prettierignore
View file @
3cece4d2
...
@@ -14,3 +14,4 @@ packages/next-codemod/transforms/__tests__/**/*
...
@@ -14,3 +14,4 @@ packages/next-codemod/transforms/__tests__/**/*
packages/next-codemod/**/*.js
packages/next-codemod/**/*.js
packages/next-codemod/**/*.d.ts
packages/next-codemod/**/*.d.ts
packages/next-env/**/*.d.ts
packages/next-env/**/*.d.ts
test-timings.json
\ No newline at end of file
azure-pipelines.yml
View file @
3cece4d2
...
@@ -3,35 +3,67 @@ variables:
...
@@ -3,35 +3,67 @@ variables:
NEXT_TELEMETRY_DISABLED
:
'
1'
NEXT_TELEMETRY_DISABLED
:
'
1'
node_version
:
^10.10.0
node_version
:
^10.10.0
jobs
:
stages
:
-
job
:
test_ie11
-
stage
:
Build
jobs
:
-
job
:
build
pool
:
pool
:
vmImage
:
'
windows-2019'
vmImage
:
'
windows-2019'
steps
:
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
-
task
:
NodeTool@0
inputs
:
inputs
:
versionSpec
:
$(node_version)
versionSpec
:
$(node_version)
displayName
:
'
Install
Node.js'
displayName
:
'
Install
Node.js'
-
task
:
Cache@2
-
task
:
CacheBeta@0
inputs
:
inputs
:
key
:
yarn | $(Agent.OS) | yarn.lock
# use deterministic cache key that is specific
path
:
$(YARN_CACHE_FOLDER)
# to this test run
displayName
:
Cache Yarn packages
key
:
$(System.pullRequest.sourceCommitId)
path
:
$(System.DefaultWorkingDirectory)
displayName
:
Cache Build
-
script
:
|
-
script
:
|
yarn install --frozen-lockfile --check-files
yarn install --frozen-lockfile --check-files
displayName
:
'
Install
dependencies'
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
:
|
-
script
:
|
yarn testie --forceExit test/integration/production/
yarn testie --forceExit test/integration/production/
displayName
:
'
Run
tests'
displayName
:
'
Run
tests'
-
job
:
test_chrome
-
job
:
test_chrome
pool
:
pool
:
vmImage
:
'
windows-2019'
vmImage
:
'
windows-2019'
strategy
:
strategy
:
maxParallel
:
10
matrix
:
matrix
:
node-10-1
:
node-10-1
:
group
:
1/4
group
:
1/4
...
@@ -42,25 +74,24 @@ jobs:
...
@@ -42,25 +74,24 @@ jobs:
node-10-4
:
node-10-4
:
group
:
4/4
group
:
4/4
steps
:
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
:
|
-
script
:
|
wmic datafile where name="C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe" get Version /value
wmic datafile where name="C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe" get Version /value
displayName
:
'
List
Chrome
version'
displayName
:
'
List
Chrome
version'
-
task
:
NodeTool@0
-
task
:
NodeTool@0
inputs
:
inputs
:
versionSpec
:
$(node_version)
versionSpec
:
$(node_version)
displayName
:
'
Install
Node.js'
displayName
:
'
Install
Node.js'
-
task
:
Cache@2
-
task
:
CacheBeta@0
inputs
:
inputs
:
key
:
yarn | $(Agent.OS) | yarn.lock
# use deterministic cache key that is specific
path
:
$(YARN_CACHE_FOLDER)
# to this test run
displayName
:
Cache Yarn packages
key
:
$(System.pullRequest.sourceCommitId)
path
:
$(System.DefaultWorkingDirectory)
-
script
:
|
displayName
:
Cache Build
yarn install --frozen-lockfile --check-files
displayName
:
'
Install
dependencies'
-
script
:
|
-
script
:
|
node run-tests.js -g $(group) --timings --azure
node run-tests.js -g $(group) --timings --azure
displayName
:
'
Run
tests'
displayName
:
'
Run
tests'
run-tests.js
View file @
3cece4d2
...
@@ -22,6 +22,7 @@ const TIMINGS_API = `https://next-timings.jjsweb.site/api/timings`
...
@@ -22,6 +22,7 @@ const TIMINGS_API = `https://next-timings.jjsweb.site/api/timings`
parseInt
(
process
.
argv
[
concurrencyIdx
+
1
],
10
)
||
DEFAULT_CONCURRENCY
parseInt
(
process
.
argv
[
concurrencyIdx
+
1
],
10
)
||
DEFAULT_CONCURRENCY
const
outputTimings
=
process
.
argv
.
indexOf
(
'--timings'
)
!==
-
1
const
outputTimings
=
process
.
argv
.
indexOf
(
'--timings'
)
!==
-
1
const
writeTimings
=
process
.
argv
.
indexOf
(
'--write-timings'
)
!==
-
1
const
isAzure
=
process
.
argv
.
indexOf
(
'--azure'
)
!==
-
1
const
isAzure
=
process
.
argv
.
indexOf
(
'--azure'
)
!==
-
1
const
groupIdx
=
process
.
argv
.
indexOf
(
'-g'
)
const
groupIdx
=
process
.
argv
.
indexOf
(
'-g'
)
const
groupArg
=
groupIdx
!==
-
1
&&
process
.
argv
[
groupIdx
+
1
]
const
groupArg
=
groupIdx
!==
-
1
&&
process
.
argv
[
groupIdx
+
1
]
...
@@ -39,6 +40,13 @@ const TIMINGS_API = `https://next-timings.jjsweb.site/api/timings`
...
@@ -39,6 +40,13 @@ const TIMINGS_API = `https://next-timings.jjsweb.site/api/timings`
if
(
outputTimings
&&
groupArg
)
{
if
(
outputTimings
&&
groupArg
)
{
console
.
log
(
'Fetching previous timings data'
)
console
.
log
(
'Fetching previous timings data'
)
try
{
try
{
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
(
!
prevTimings
)
{
const
timingsRes
=
await
fetch
(
const
timingsRes
=
await
fetch
(
`
${
TIMINGS_API
}
?which=
${
isAzure
?
'azure'
:
'actions'
}
`
`
${
TIMINGS_API
}
?which=
${
isAzure
?
'azure'
:
'actions'
}
`
)
)
...
@@ -48,6 +56,13 @@ const TIMINGS_API = `https://next-timings.jjsweb.site/api/timings`
...
@@ -48,6 +56,13 @@ const TIMINGS_API = `https://next-timings.jjsweb.site/api/timings`
}
}
prevTimings
=
await
timingsRes
.
json
()
prevTimings
=
await
timingsRes
.
json
()
console
.
log
(
'Fetched previous timings data successfully'
)
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
)
}
}
}
catch
(
err
)
{
}
catch
(
err
)
{
console
.
log
(
`Failed to fetch timings data`
,
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', () => {
...
@@ -91,37 +91,37 @@ describe('Build Output', () => {
}
}
// should be no bigger than 265 bytes
// 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
)
expect
(
indexSize
.
endsWith
(
'B'
)).
toBe
(
true
)
// should be no bigger than 60.8 kb
// 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
(
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
(
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
(
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
)
expect
(
sharedByAll
.
endsWith
(
'kB'
)).
toBe
(
true
)
if
(
_appSize
.
endsWith
(
'kB'
))
{
if
(
_appSize
.
endsWith
(
'kB'
))
{
expect
(
parseFloat
(
_appSize
)).
toBeLessThanOrEqual
(
1.0
1
)
expect
(
parseFloat
(
_appSize
)).
toBeLessThanOrEqual
(
1.0
2
)
expect
(
_appSize
.
endsWith
(
'kB'
)).
toBe
(
true
)
expect
(
_appSize
.
endsWith
(
'kB'
)).
toBe
(
true
)
}
else
{
}
else
{
expect
(
parseFloat
(
_appSize
)
-
1000
).
toBeLessThanOrEqual
(
0
)
expect
(
parseFloat
(
_appSize
)
-
1000
).
toBeLessThanOrEqual
(
0
)
expect
(
_appSize
.
endsWith
(
' B'
)).
toBe
(
true
)
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
(
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
(
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
)
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