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

Adds registry-url and always-auth parameters #64

Merged
merged 2 commits into from
Aug 31, 2021

Conversation

pzuraq
Copy link
Contributor

@pzuraq pzuraq commented Aug 12, 2021

These parameters match the ones passed to the setup-node GH action. The
implementation is mostly taken from there, with a few
updates/modifications (e.g. using fs/promises).

Fixes #47

@pzuraq pzuraq force-pushed the add-registry-url branch 2 times, most recently from 97c37fe to 1c7f862 Compare August 27, 2021 19:53
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!

Would you mind adding an "acceptance" test confirming that things work "end to end"?

I'm thinking something

test-specific-volta:
runs-on: "${{ matrix.os }}-latest"
strategy:
fail-fast: false
matrix:
volta-version: ["0.9.0","0.8.7","0.7.2","0.6.8"]
os: [ubuntu, macOS, windows]
exclude:
# this action didn't support windows until at least Volta 0.7
- os: windows
volta-version: "0.6.8"
steps:
- uses: actions/checkout@v1
- run: npm ci
- run: npm run build
- uses: ./
with:
volta-version: ${{ matrix.volta-version }}
- run: tests/log-info.sh
- run: tests/check-version.sh 'volta' ${{ matrix.volta-version }}
- run: volta install [email protected] [email protected]
- run: tests/check-version.sh 'node' 'v10.17.0'
- run: tests/check-version.sh 'yarn' '1.19.0'

Which might look like:

  test-specified-registry-url:
    runs-on: "${{ matrix.os }}-latest"

    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu, macOS, windows]

    steps:
    - uses: actions/checkout@v1
    - run: npm ci
    - run: npm run build
    - uses: ./
      with:
        registry-url: "https://some.path.here.com/lol/"

    - run: tests/log-info.sh
    - run: tests/check-version.sh 'volta' ${{ matrix.volta-version }}
    - run: volta install [email protected] [email protected]
    - run: tests/check-version.sh 'node' 'v10.17.0'
    - run: tests/check-version.sh 'yarn' '1.19.0'
    - run: tests/check-registry.sh 'npm' 'https://some.path.here.com/lol/'

tests/check-registry.sh can basically echo the file contents and then confirm via npm config get registry

These parameters match the ones passed to the setup-node GH action. The
implementation is mostly taken from there, with a few
updates/modifications (e.g. using `fs/promises`).
@rwjblue rwjblue merged commit dade8d5 into volta-cli:master Aug 31, 2021
@rwjblue rwjblue added the enhancement New feature or request label Aug 31, 2021
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 actions/setup-node's registry-url input
2 participants