Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for specifying npm-version as an option #53

Merged
merged 1 commit into from
Feb 9, 2021
Merged

Add support for specifying npm-version as an option #53

merged 1 commit into from
Feb 9, 2021

Conversation

felipecrs
Copy link
Contributor

Closes #51

Copy link
Collaborator

@rwjblue rwjblue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this!

The code looks good, but we need a few test scenarios specifically for npm now.

  • Update the test-no-options scenario:

- run: volta install node@12.16.1 yarn@1.19.1
- run: tests/check-version.sh 'node' 'v12.16.1'
- run: tests/check-version.sh 'yarn' '1.19.1'

    - run: volta install node@12.16.1 yarn@1.19.1 npm@6.0.0
    - run: tests/check-version.sh 'node' 'v12.16.1'
    - run: tests/check-version.sh 'yarn' '1.19.1'
    - run: tests/check-version.sh 'npm' '6.0.0'
  • Tweak test-specified-node-yarn-overrides-pinned-versions test scenario to mention npm, and check npm version:

test-specified-node-yarn-overrides-pinned-versions:
runs-on: "${{ matrix.os }}-latest"
defaults:
run:
working-directory: ./action
strategy:
matrix:
os: [ubuntu, macOS, windows]
steps:
- uses: actions/checkout@v2
with:
ref: 'branch-for-testing-overriding-pinned-projects-in-ci'
- uses: actions/checkout@v2
with:
path: action
- run: npm ci
- run: npm run build
- uses: ./action
with:
node-version: 12.14.0
yarn-version: 1.22.0
- run: tests/log-info.sh
- run: tests/check-version.sh 'node' 'v12.14.0'
- run: tests/check-version.sh 'yarn' '1.22.0'

  • Update this test scenario:

test-specific-volta-node-yarn:
runs-on: "${{ matrix.os }}-latest"
strategy:
matrix:
os: [ubuntu, macOS, windows]
steps:
- uses: actions/checkout@v1
- run: npm ci
- run: npm run build
- uses: ./
with:
volta-version: 0.8.7
node-version: 12.0.0
yarn-version: 1.22.0
- run: tests/log-info.sh
- run: tests/check-version.sh 'volta' '0.8.7'
- run: tests/check-version.sh 'node' 'v12.0.0'
- run: tests/check-version.sh 'yarn' '1.22.0'

@felipecrs
Copy link
Contributor Author

@rwjblue npm installation seems to fail on Windows... 6.0.0. I'll test with a newer version, just to check.

@felipecrs
Copy link
Contributor Author

Ok, it worked with npm@7.

But be aware: https://github.com/volta-cli/action/runs/1865368873, it might be an issue in Volta. :)

@rwjblue rwjblue merged commit 1d5a187 into volta-cli:master Feb 9, 2021
@rwjblue rwjblue added the enhancement New feature or request label Feb 9, 2021
@rwjblue
Copy link
Collaborator

rwjblue commented Feb 9, 2021

Thank you!!

@rwjblue rwjblue changed the title Add support for npm Add support for specifying npm-version as an option Feb 9, 2021
@felipecrs felipecrs deleted the npm branch February 9, 2021 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support npm-version
2 participants