mirror of
https://github.com/actions/node-versions.git
synced 2025-01-10 18:15:21 +00:00
Get rid of azure-pipelines folder
This commit is contained in:
parent
70f1fd4673
commit
c52043a439
@ -29,22 +29,20 @@ Here are a few things you can do that will increase the likelihood of your pull
|
|||||||
### Directory structure
|
### Directory structure
|
||||||
```
|
```
|
||||||
|
|
||||||
├── azure-pipelines/
|
├── .github/
|
||||||
| └──templates/
|
| └──workflows/
|
||||||
├── builders/
|
├── builders/
|
||||||
├── helpers/
|
├── helpers/
|
||||||
├── installers/
|
├── installers/
|
||||||
└── tests/
|
└── tests/
|
||||||
└──sources/
|
└──sources/
|
||||||
```
|
```
|
||||||
- `azure-pipelines*` - contains global YAML definitions for build pipelines. Reusable templates for specific jobs are located in `templates` subfolder.
|
- `.github/workflows` - contains repository workflow files.
|
||||||
- `builders` - contains Node.js builder classes and functions.
|
- `builders` - contains Node.js builder classes and functions.
|
||||||
- `helpers` - contains global helper functions and functions.
|
- `helpers` - contains global helper classes and functions.
|
||||||
- `installers` - contains installation script templates.
|
- `installers` - contains installation script templates.
|
||||||
- `tests` - contains test scripts. Required tests sources are located in `sources` subfolder.
|
- `tests` - contains test scripts. Required tests sources are located in `sources` subfolder.
|
||||||
|
|
||||||
\* _We use Azure Pipelines because there are a few features that Actions is still missing, we'll move to Actions as soon as possible_.
|
|
||||||
|
|
||||||
## Resources
|
## Resources
|
||||||
|
|
||||||
- [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/)
|
- [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/)
|
||||||
|
@ -1,65 +0,0 @@
|
|||||||
name: $(date:yyyyMMdd)$(rev:.r)-Node.js-$(VERSION)
|
|
||||||
trigger: none
|
|
||||||
pr:
|
|
||||||
autoCancel: true
|
|
||||||
branches:
|
|
||||||
include:
|
|
||||||
- main
|
|
||||||
paths:
|
|
||||||
exclude:
|
|
||||||
- versions-manifest.json
|
|
||||||
|
|
||||||
stages:
|
|
||||||
- stage: Build_Node_Darwin
|
|
||||||
dependsOn: []
|
|
||||||
variables:
|
|
||||||
Platform: darwin
|
|
||||||
Architecture: x64
|
|
||||||
jobs:
|
|
||||||
- template: /azure-pipelines/templates/build-job.yml
|
|
||||||
|
|
||||||
- stage: Test_Node_Darwin
|
|
||||||
condition: succeeded()
|
|
||||||
dependsOn: Build_Node_Darwin
|
|
||||||
variables:
|
|
||||||
VmImage: macOS-latest
|
|
||||||
Platform: darwin
|
|
||||||
Architecture: x64
|
|
||||||
jobs:
|
|
||||||
- template: /azure-pipelines/templates/test-job.yml
|
|
||||||
|
|
||||||
- stage: Build_Node_Linux
|
|
||||||
dependsOn: []
|
|
||||||
variables:
|
|
||||||
Platform: linux
|
|
||||||
Architecture: x64
|
|
||||||
jobs:
|
|
||||||
- template: /azure-pipelines/templates/build-job.yml
|
|
||||||
|
|
||||||
- stage: Test_Node_Linux
|
|
||||||
condition: succeeded()
|
|
||||||
dependsOn: Build_Node_Linux
|
|
||||||
variables:
|
|
||||||
VmImage: ubuntu-latest
|
|
||||||
Platform: linux
|
|
||||||
Architecture: x64
|
|
||||||
jobs:
|
|
||||||
- template: /azure-pipelines/templates/test-job.yml
|
|
||||||
|
|
||||||
- stage: Build_Node_Windows
|
|
||||||
dependsOn: []
|
|
||||||
variables:
|
|
||||||
Platform: win32
|
|
||||||
Architecture: x64
|
|
||||||
jobs:
|
|
||||||
- template: /azure-pipelines/templates/build-job.yml
|
|
||||||
|
|
||||||
- stage: Test_Node_Windows
|
|
||||||
condition: succeeded()
|
|
||||||
dependsOn: Build_Node_Windows
|
|
||||||
variables:
|
|
||||||
VmImage: windows-latest
|
|
||||||
Platform: win32
|
|
||||||
Architecture: x64
|
|
||||||
jobs:
|
|
||||||
- template: /azure-pipelines/templates/test-job.yml
|
|
@ -1,21 +0,0 @@
|
|||||||
jobs:
|
|
||||||
- job: Build_Node
|
|
||||||
timeoutInMinutes: 90
|
|
||||||
pool:
|
|
||||||
name: Azure Pipelines
|
|
||||||
vmImage: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- checkout: self
|
|
||||||
|
|
||||||
- task: PowerShell@2
|
|
||||||
displayName: 'Build Node $(Version)'
|
|
||||||
inputs:
|
|
||||||
targetType: filePath
|
|
||||||
filePath: './builders/build-node.ps1'
|
|
||||||
arguments: '-Version $(Version) -Platform $(Platform) -Architecture $(Architecture)'
|
|
||||||
|
|
||||||
- task: PublishPipelineArtifact@1
|
|
||||||
displayName: 'Publish Artifact: Node.js $(Version)'
|
|
||||||
inputs:
|
|
||||||
targetPath: '$(Build.ArtifactStagingDirectory)'
|
|
||||||
artifactName: 'node-$(Version)-$(Platform)-$(Architecture)'
|
|
@ -1,75 +0,0 @@
|
|||||||
jobs:
|
|
||||||
- job: Test_Node
|
|
||||||
pool:
|
|
||||||
name: Azure Pipelines
|
|
||||||
vmImage: $(VmImage)
|
|
||||||
steps:
|
|
||||||
- checkout: self
|
|
||||||
submodules: true
|
|
||||||
|
|
||||||
- task: PowerShell@2
|
|
||||||
displayName: Fully cleanup the toolcache directory before testing
|
|
||||||
inputs:
|
|
||||||
targetType: filePath
|
|
||||||
filePath: helpers/clean-toolcache.ps1
|
|
||||||
arguments: -ToolName "node"
|
|
||||||
|
|
||||||
- task: DownloadPipelineArtifact@2
|
|
||||||
inputs:
|
|
||||||
source: 'current'
|
|
||||||
artifact: 'node-$(Version)-$(Platform)-$(Architecture)'
|
|
||||||
path: $(Build.ArtifactStagingDirectory)
|
|
||||||
|
|
||||||
- task: ExtractFiles@1
|
|
||||||
inputs:
|
|
||||||
archiveFilePatterns: '$(Build.ArtifactStagingDirectory)/node-$(Version)-$(Platform)-$(Architecture).*'
|
|
||||||
destinationFolder: $(Build.BinariesDirectory)
|
|
||||||
cleanDestinationFolder: false
|
|
||||||
|
|
||||||
- task: PowerShell@2
|
|
||||||
displayName: 'Apply build artifact to the local machines'
|
|
||||||
inputs:
|
|
||||||
targetType: inline
|
|
||||||
script: |
|
|
||||||
if ("$(Platform)" -match 'win32') { powershell ./setup.ps1 } else { sh ./setup.sh }
|
|
||||||
workingDirectory: '$(Build.BinariesDirectory)'
|
|
||||||
|
|
||||||
- task: NodeTool@0
|
|
||||||
displayName: 'Use Node $(Version)'
|
|
||||||
inputs:
|
|
||||||
versionSpec: $(Version)
|
|
||||||
|
|
||||||
- task: PowerShell@2
|
|
||||||
displayName: 'Wait for the logs'
|
|
||||||
inputs:
|
|
||||||
targetType: inline
|
|
||||||
script: |
|
|
||||||
Write-Host "Fake step that do nothing"
|
|
||||||
Write-Host "We need it because log of previous step 'Use Node' is not available here yet."
|
|
||||||
Write-Host "In testing step (Node.Tests.ps1) we analyze build log of 'Use Node' task"
|
|
||||||
Write-Host "to determine if Node.js version was consumed from cache and was downloaded"
|
|
||||||
- task: PowerShell@2
|
|
||||||
displayName: 'Run tests'
|
|
||||||
inputs:
|
|
||||||
TargetType: inline
|
|
||||||
script: |
|
|
||||||
Install-Module Pester -Force -Scope CurrentUser -RequiredVersion 4.10.1
|
|
||||||
Import-Module Pester
|
|
||||||
$pesterParams = @{
|
|
||||||
Path="./Node.Tests.ps1";
|
|
||||||
Parameters=@{
|
|
||||||
Version="$(Version)";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Invoke-Pester -Script $pesterParams -OutputFile "test_results.xml" -OutputFormat NUnitXml
|
|
||||||
workingDirectory: '$(Build.SourcesDirectory)/tests'
|
|
||||||
|
|
||||||
- task: PublishTestResults@2
|
|
||||||
displayName: 'Publish test results'
|
|
||||||
inputs:
|
|
||||||
testResultsFiles: '*.xml'
|
|
||||||
testResultsFormat: NUnit
|
|
||||||
searchFolder: 'tests'
|
|
||||||
failTaskOnFailedTests: true
|
|
||||||
testRunTitle: "Node.js $(Version)-$(Platform)"
|
|
||||||
condition: always()
|
|
Loading…
Reference in New Issue
Block a user