Skip to content

Merge pull request #148 from volta-cli/rwjblue/re-roll-lock #393

Merge pull request #148 from volta-cli/rwjblue/re-roll-lock

Merge pull request #148 from volta-cli/rwjblue/re-roll-lock #393

Workflow file for this run

name: 'CI'
on:
pull_request:
push:
branches:
- master
- 'releases/*'
defaults:
run:
shell: bash
env:
NODE_OPTIONS: '--unhandled-rejections=strict'
concurrency:
group: ci-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: '${{ matrix.os }}-latest'
strategy:
matrix:
os: [ubuntu, macOS, windows]
steps:
- uses: actions/checkout@v3
- run: npm ci
- run: npm run lint
- run: npm run build
- run: npm test
test-specific-volta:
runs-on: '${{ matrix.os }}-latest'
strategy:
fail-fast: false
matrix:
volta-version: ['1.0.0', '1.0.8', '1.1.0']
os: [ubuntu, macOS, windows]
exclude:
- os: ubuntu
volta-version: '1.0.0'
steps:
- uses: actions/checkout@v3
with:
path: action
- run: npm ci
working-directory: ./action
- run: npm run build
working-directory: ./action
- uses: ./action
with:
volta-version: ${{ matrix.volta-version }}
- run: ./action/tests/log-info.sh
- run: ./action/tests/check-version.sh 'volta' ${{ matrix.volta-version }}
- run: volta install node@10.17.0 yarn@1.19.0
- run: ./action/tests/check-version.sh 'node' 'v10.17.0'
- run: ./action/tests/check-version.sh 'yarn' '1.19.0'
test-no-options:
runs-on: '${{ matrix.os }}-latest'
strategy:
matrix:
os: [ubuntu, macOS, windows]
steps:
- uses: actions/checkout@v3
with:
path: action
- run: npm ci
working-directory: ./action
- run: npm run build
working-directory: ./action
- uses: ./action
- run: ./action/tests/log-info.sh
- run: ./action/tests/check-version.sh 'volta' 'current'
- run: volta install node@12.16.1 npm@7.5.2 yarn@1.19.1
- run: ./action/tests/check-version.sh 'node' 'v12.16.1'
- run: ./action/tests/check-version.sh 'npm' '7.5.2'
- run: ./action/tests/check-version.sh 'yarn' '1.19.1'
test-specified-node-npm-yarn-overrides-pinned-versions:
runs-on: '${{ matrix.os }}-latest'
strategy:
matrix:
os: [ubuntu, macOS, windows]
steps:
- uses: actions/checkout@v3
with:
ref: 'branch-for-testing-overriding-pinned-projects-in-ci'
- uses: actions/checkout@v3
with:
path: action
- run: npm ci
working-directory: ./action
- run: npm run build
working-directory: ./action
- uses: ./action
with:
node-version: 12.14.0
npm-version: 7.5.2
yarn-version: 1.22.0
- run: ./action/tests/log-info.sh
- run: ./action/tests/check-version.sh 'node' 'v12.14.0'
- run: ./action/tests/check-version.sh 'npm' '7.5.2'
- run: ./action/tests/check-version.sh 'yarn' '1.22.0'
test-specific-volta-node-npm-yarn:
runs-on: '${{ matrix.os }}-latest'
strategy:
matrix:
os: [ubuntu, macOS, windows]
steps:
- uses: actions/checkout@v3
with:
path: action
- run: npm ci
working-directory: ./action
- run: npm run build
working-directory: ./action
- uses: ./action
with:
volta-version: 1.0.8
node-version: 12.0.0
npm-version: 7.5.2
yarn-version: 1.22.0
- run: ./action/tests/log-info.sh
- run: ./action/tests/check-version.sh 'volta' '1.0.8'
- run: ./action/tests/check-version.sh 'node' 'v12.0.0'
- run: ./action/tests/check-version.sh 'npm' '7.5.2'
- run: ./action/tests/check-version.sh 'yarn' '1.22.0'
test-specified-registry-url:
runs-on: '${{ matrix.os }}-latest'
strategy:
fail-fast: false
matrix:
os: [ubuntu, macOS, windows]
steps:
- uses: actions/checkout@v3
with:
path: action
- run: npm ci
working-directory: ./action
- run: npm run build
working-directory: ./action
- uses: ./action
with:
registry-url: 'https://some.path.here.com/lol/'
- run: ./action/tests/log-info.sh
- run: ./action/tests/check-version.sh 'volta' 'current'
- run: volta install node@10.17.0 yarn@1.19.0
- run: ./action/tests/check-version.sh 'node' 'v10.17.0'
- run: ./action/tests/check-version.sh 'yarn' '1.19.0'
- run: ./action/tests/check-registry.sh 'https://some.path.here.com/lol/'
test-specific-variant:
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v3
with:
path: action
- run: npm ci
working-directory: ./action
- run: npm run build
working-directory: ./action
- uses: ./action
with:
variant: linux
- run: ./action/tests/log-info.sh
- run: ./action/tests/check-version.sh 'volta' 'current'
- run: volta install node@12.16.1 npm@7.5.2 yarn@1.19.1
- run: ./action/tests/check-version.sh 'node' 'v12.16.1'
- run: ./action/tests/check-version.sh 'npm' '7.5.2'
- run: ./action/tests/check-version.sh 'yarn' '1.19.1'
test-js-project-in-subdir-no-options:
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v3
with:
path: action
- uses: actions/checkout@v3
with:
ref: 'branch-for-testing-overriding-pinned-projects-in-ci'
path: 'js-stuff'
- run: npm ci
working-directory: ./action
- run: npm run build
working-directory: ./action
- uses: ./action
- run: ./action/tests/log-info.sh
- run: ./action/tests/check-version.sh 'volta' 'current'
- run: ../action/tests/check-version.sh 'node' 'v12.16.1'
working-directory: ./js-stuff
- run: ../action/tests/check-version.sh 'yarn' '1.22.4'
working-directory: ./js-stuff
test-js-project-in-subdir-with-overrides:
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v3
with:
path: action
- uses: actions/checkout@v3
with:
ref: 'branch-for-testing-overriding-pinned-projects-in-ci'
path: 'js-stuff'
- run: npm ci
working-directory: ./action
- run: npm run build
working-directory: ./action
- uses: ./action
with:
package-json-path: 'js-stuff/package.json'
node-version: 12.14.0
npm-version: 7.5.2
yarn-version: 1.22.0
- run: ./action/tests/log-info.sh
- run: ./action/tests/check-version.sh 'volta' 'current'
- run: ../action/tests/check-version.sh 'node' 'v12.14.0'
working-directory: ./js-stuff
- run: ../action/tests/check-version.sh 'npm' '7.5.2'
working-directory: ./js-stuff
- run: ../action/tests/check-version.sh 'yarn' '1.22.0'
working-directory: ./js-stuff