mirror of
https://github.com/actions/node-versions.git
synced 2025-09-12 08:11:25 +08:00
Compare commits
59 Commits
deprecatio
...
test-arm64
Author | SHA1 | Date | |
---|---|---|---|
|
ec27571eae | ||
|
bd9a2e8e82 | ||
|
c79c183aa1 | ||
|
f0dfcccfe7 | ||
|
8de3d72cb1 | ||
|
8ca96eb4cb | ||
|
2a1b448870 | ||
|
4a0b418a79 | ||
|
d4f90c669c | ||
|
603b5e4794 | ||
|
5c75f27e7e | ||
|
9b824cdd95 | ||
|
37c6c3a813 | ||
|
b635d778f3 | ||
|
57bef4861a | ||
|
5b20cd9fc1 | ||
|
afb778a6b3 | ||
|
dd8ef7901f | ||
|
f89b01ffb0 | ||
|
921e8d9f35 | ||
|
47252c228f | ||
|
36b2cbcda8 | ||
|
d920d43ef0 | ||
|
ad4d6a9a31 | ||
|
f8eaf50e03 | ||
|
49750423f1 | ||
|
8455456cfe | ||
|
2c843f30c3 | ||
|
05826df7a9 | ||
|
0b32a21a33 | ||
|
8e6ce03db5 | ||
|
d9d6de2703 | ||
|
4698451ff9 | ||
|
e9db515b8b | ||
|
ec09b8ed02 | ||
|
22b86c61f6 | ||
|
ee011d651d | ||
|
f33462c8a2 | ||
|
b8355a0fcc | ||
|
d2561554de | ||
|
ab329f0180 | ||
|
cb84d2280a | ||
|
a26a00efbb | ||
|
386b5d6f78 | ||
|
fb3241c6f2 | ||
|
c88b3f72e2 | ||
|
6c82900b55 | ||
|
de463ffcdb | ||
|
d51fc26ff7 | ||
|
fee25d72a2 | ||
|
bb598e8c31 | ||
|
a798c8ed46 | ||
|
9d10c5b01a | ||
|
a4a2f9a437 | ||
|
3d5333b8c1 | ||
|
897b0a01fc | ||
|
605dcd4078 | ||
|
705d5d4eb2 | ||
|
aa0c3a667a |
4
.github/workflows/build-node-packages.yml
vendored
4
.github/workflows/build-node-packages.yml
vendored
@@ -23,9 +23,9 @@ on:
|
||||
jobs:
|
||||
node:
|
||||
name: Node
|
||||
uses: actions/versions-package-tools/.github/workflows/build-tool-packages.yml@main
|
||||
uses: actions/versions-package-tools/.github/workflows/build-tool-packages.yml@test-arm64
|
||||
with:
|
||||
tool-name: "node"
|
||||
tool-version: ${{ inputs.VERSION || '18.12.0' }}
|
||||
publish-release: ${{ inputs.PUBLISH_RELEASES || false }}
|
||||
secrets: inherit
|
||||
secrets: inherit
|
||||
|
@@ -54,7 +54,7 @@ class NixNodeBuilder : NodeBuilder {
|
||||
$installationTemplateLocation = Join-Path -Path $this.InstallationTemplatesLocation -ChildPath $this.InstallationTemplateName
|
||||
|
||||
$installationTemplateContent = Get-Content -Path $installationTemplateLocation -Raw
|
||||
$installationTemplateContent = $installationTemplateContent -f $this.Version.ToString(3)
|
||||
$installationTemplateContent = $installationTemplateContent -f $this.Version.ToString(3), $this.Architecture
|
||||
$installationTemplateContent | Out-File -FilePath $installationScriptLocation
|
||||
|
||||
Write-Debug "Done; Installation script location: $installationScriptLocation)"
|
||||
|
2
helpers
2
helpers
Submodule helpers updated: b964a9871b...6fbb1f0f20
@@ -1,10 +1,11 @@
|
||||
set -e
|
||||
|
||||
NODE_VERSION={0}
|
||||
ARCH={1}
|
||||
|
||||
NODE_TOOLCACHE_PATH=$AGENT_TOOLSDIRECTORY/node
|
||||
NODE_TOOLCACHE_VERSION_PATH=$NODE_TOOLCACHE_PATH/$NODE_VERSION
|
||||
NODE_TOOLCACHE_VERSION_ARCH_PATH=$NODE_TOOLCACHE_VERSION_PATH/x64
|
||||
NODE_TOOLCACHE_VERSION_ARCH_PATH=$NODE_TOOLCACHE_VERSION_PATH/$ARCH
|
||||
|
||||
echo "Check if Node.js hostedtoolcache folder exist..."
|
||||
if [ ! -d $NODE_TOOLCACHE_PATH ]; then
|
||||
@@ -22,4 +23,4 @@ cp -R ./* $NODE_TOOLCACHE_VERSION_ARCH_PATH
|
||||
rm $NODE_TOOLCACHE_VERSION_ARCH_PATH/setup.sh
|
||||
|
||||
echo "Create complete file"
|
||||
touch $NODE_TOOLCACHE_VERSION_PATH/x64.complete
|
||||
touch $NODE_TOOLCACHE_VERSION_PATH/$ARCH.complete
|
||||
|
@@ -1,12 +1,16 @@
|
||||
Import-Module (Join-Path $PSScriptRoot "../helpers/pester-extensions.psm1")
|
||||
|
||||
|
||||
|
||||
Describe "Node.js" {
|
||||
|
||||
BeforeAll {
|
||||
function Get-UseNodeLogs {
|
||||
# GitHub Windows images don't have `HOME` variable
|
||||
$homeDir = $env:HOME ?? $env:HOMEDRIVE
|
||||
$logsFolderPath = Join-Path -Path $homeDir -ChildPath "runners/*/_diag/pages" -Resolve
|
||||
|
||||
$useNodeLogFile = Get-ChildItem -Path $logsFolderPath | Where-Object {
|
||||
|
||||
# GitHub Windows images don't have `HOME` variable
|
||||
$homeDir = $env:HOME ?? $env:HOMEDRIVE
|
||||
$logsFolderPath = Join-Path -Path $homeDir -ChildPath "runners/*/_diag/pages" -Resolve
|
||||
$useNodeLogFile = Get-ChildItem -Path $logsFolderPath | Where-Object {
|
||||
$logContent = Get-Content $_.Fullname -Raw
|
||||
return $logContent -match "setup-node@v"
|
||||
} | Select-Object -First 1
|
||||
@@ -14,7 +18,6 @@ BeforeAll {
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Node.js" {
|
||||
It "is available" {
|
||||
"node --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
@@ -34,15 +37,25 @@ Describe "Node.js" {
|
||||
$nodePath.startsWith($expectedPath) | Should -BeTrue -Because "'$nodePath' is not started with '$expectedPath'"
|
||||
}
|
||||
|
||||
It "cached version is used without downloading" {
|
||||
# Analyze output of previous steps to check if Node.js was consumed from cache or downloaded
|
||||
$useNodeLogFile = Get-UseNodeLogs
|
||||
$useNodeLogFile | Should -Exist
|
||||
$useNodeLogContent = Get-Content $useNodeLogFile -Raw
|
||||
$useNodeLogContent | Should -Match "Found in cache"
|
||||
It "cached version is used without downloading" {
|
||||
|
||||
if ($env:RUNNER_TYPE -eq "self-hosted") {
|
||||
# Get the installed version of Node.js
|
||||
$nodeVersion = Invoke-Expression "node --version"
|
||||
# Check if Node.js is installed
|
||||
$nodeVersion | Should -Not -BeNullOrEmpty
|
||||
# Check if the installed version of Node.js is the expected version
|
||||
$nodeVersion | Should -Match $env:VERSION
|
||||
}else {
|
||||
# Analyze output of previous steps to check if Node.js was consumed from cache or downloaded
|
||||
$useNodeLogFile = Get-UseNodeLogs
|
||||
$useNodeLogFile | Should -Exist
|
||||
$useNodeLogContent = Get-Content $useNodeLogFile -Raw
|
||||
$useNodeLogContent | Should -Match "Found in cache"
|
||||
}
|
||||
}
|
||||
|
||||
It "Run simple code" {
|
||||
"node ./simple-test.js" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user