embark/azure-pipelines.yml
Michael Bradley ed02cc849f build: bump all packages' engines settings (#1985)
BREAKING CHANGE:

node: >=10.17.0 <12.0.0
npm: >=6.11.3
yarn: >=1.19.1

node v10.17.0 is the latest in the 10.x series and is still in the Active LTS
lifecycle. Embark is still not compatible with node's 12.x and 13.x
series (because of some dependencies), otherwise it would probably make sense
to bump our minimum supported node version all the way to the most recent 12.x
release.

npm v6.11.3 is the version that's bundled with node v10.17.0.

yarn v1.19.1 is the most recent version as of the time node v10.17.0 was
released.
2019-10-24 09:52:05 -04:00

116 lines
3.1 KiB
YAML

variables:
ipfsVersion: '0.4.22'
node10: '^10.17.0'
pythonVersion: '2.7.x'
yarnVersion: '1.19.1'
strategy:
matrix:
Node 10 / Linux:
nodeVersion: $(node10)
imageName: 'ubuntu-18.04'
Node 10 / macOS:
nodeVersion: $(node10)
imageName: 'macos-10.14'
Node 10 / Windows:
nodeVersion: $(node10)
imageName: 'vs2017-win2016'
pool:
vmImage: $(imageName)
steps:
- task: NodeTool@0
condition: succeeded()
displayName: 'Install Node.js'
inputs:
versionSpec: $(nodeVersion)
- task: UsepythonVersion@0
condition: succeeded()
displayName: 'Install Python'
inputs:
architecture: x64
versionSpec: $(pythonVersion)
- bash: |
mkdir -p ../Downloads
cd ../Downloads
ARCHIVE_EXT="tar.gz"
if [[ "$AGENT_OS" = "Linux" ]]; then
OS="linux"
fi
if [[ "$AGENT_OS" = "Darwin" ]]; then
OS="darwin"
fi
if [[ "$AGENT_OS" = "Windows_NT" ]]; then
OS="windows"
ARCHIVE_EXT="zip"
fi
URL="https://dist.ipfs.io/go-ipfs/v${IPFSVERSION}/go-ipfs_v${IPFSVERSION}_${OS}-amd64.${ARCHIVE_EXT}"
curl -L -o "go-ipfs.${ARCHIVE_EXT}" "$URL"
if [[ "$AGENT_OS" = "Windows_NT" ]]; then
unzip go-ipfs.zip
else
tar xzvf go-ipfs.tar.gz
fi
condition: succeeded()
displayName: 'Install IPFS'
- bash: |
export PATH="$(cd ../Downloads && pwd)/go-ipfs:${PATH}"
ipfs version
ipfs init
condition: succeeded()
displayName: 'Initialize IPFS'
- bash: |
curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version "$YARNVERSION"
export PATH="${HOME}/.yarn/bin:${HOME}/.config/yarn/global/node_modules/.bin:${PATH}"
yarn --version
mkdir -p ../Downloads/Yarn
condition: succeeded()
displayName: 'Install Yarn'
- bash: |
pushd "$PWD" &>/dev/null
cd ../Downloads
export PATH="${PWD}/go-ipfs:${PATH}"
export PATH="${HOME}/.yarn/bin:${HOME}/.config/yarn/global/node_modules/.bin:${PATH}"
yarn config set cache-folder "${PWD}/Yarn" &>/dev/null
popd &>/dev/null
npm run ci:full
condition: and( succeeded(), ne( variables['Agent.OS'], 'Windows_NT' ) )
displayName: 'Test (*nix)'
- powershell: |
pushd
cd ..\Downloads
$env:PATH="$($PWD.Path)\go-ipfs;$($env:PATH)"
$env:PATH="$($env:USERPROFILE)\.yarn\bin;$($env:USERPROFILE)\.config\yarn\global\node_modules\.bin;$($env:PATH)"
yarn config set cache-folder "$($PWD.Path)\Yarn" | out-null
popd
npm run ci:full
condition: and( succeeded(), eq( variables['Agent.OS'], 'Windows_NT' ) )
displayName: 'Test (Windows)'
- bash: |
if [[ "$AGENT_OS" = "Linux" ]]; then
OS="Linux"
fi
if [[ "$AGENT_OS" = "Darwin" ]]; then
OS="macOS"
fi
if [[ "$AGENT_OS" = "Windows_NT" ]]; then
OS="Windows"
fi
export CI_PULL_REQUEST=$(node scripts/coveralls-pr-id)
if [[ -z "$CI_PULL_REQUEST" ]]; then
unset CI_PULL_REQUEST
fi
export COVERALLS_GIT_BRANCH=$(node scripts/coveralls-branch-name)
export COVERALLS_SERVICE_NAME="Azure Pipelines (${OS})"
npm run coveralls
condition: succeeded()
displayName: 'Coveralls'