Skip to content

Commit

Permalink
chore(e2e): Use different config for Verdaccio when publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
anagstef committed Mar 19, 2024
1 parent f0a5b4e commit eaba239
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 26 deletions.
16 changes: 14 additions & 2 deletions .github/actions/verdaccio/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,25 @@ runs:
shell: bash
run: npm set registry ${{ inputs.registry }}

- name: Run Verdaccio
- name: Run Verdaccio to publish
shell: bash
run: |
nohup ./node_modules/.bin/verdaccio --config ./verdaccio.yaml & sleep 5
nohup ./node_modules/.bin/verdaccio --config ./verdaccio.publish.yaml & echo "VERDACCIO_PID=$!" >> $GITHUB_ENV
sleep 5
./node_modules/.bin/npm-cli-adduser -u ${{ inputs.auth-user }} -p ${{ inputs.auth-password }} -e ${{ inputs.auth-email }} -r ${{ inputs.registry }}
./node_modules/.bin/npm-cli-login -u ${{ inputs.auth-user }} -p ${{ inputs.auth-password }} -e ${{ inputs.auth-email }} -r ${{ inputs.registry }}
- name: Publish to Verdaccio
shell: bash
run: ${{ inputs.publish-cmd }}

- name: Stop Verdaccio
shell: bash
run: kill -9 $VERDACCIO_PID

- name: Run Verdaccio to install
shell: bash
run: |
nohup ./node_modules/.bin/verdaccio --config ./verdaccio.install.yaml & sleep 5
./node_modules/.bin/npm-cli-adduser -u ${{ inputs.auth-user }} -p ${{ inputs.auth-password }} -e ${{ inputs.auth-email }} -r ${{ inputs.registry }}
./node_modules/.bin/npm-cli-login -u ${{ inputs.auth-user }} -p ${{ inputs.auth-password }} -e ${{ inputs.auth-email }} -r ${{ inputs.registry }}
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ jobs:
uses: ./.github/actions/verdaccio
with:
publish-cmd: |
if [ "$(npm config get registry)" = "https://registry.npmjs.org/" ]; then echo 'Error: Using default registry' && exit 1; else npx turbo build $TURBO_ARGS --only && npx changeset pre exit && npx changeset version && npx changeset publish --no-git-tag --tag e2e; fi
if [ "$(npm config get registry)" = "https://registry.npmjs.org/" ]; then echo 'Error: Using default registry' && exit 1; else npx turbo build $TURBO_ARGS --only && npx changeset publish --no-git-tag; fi
- name: Install @clerk/backend in /integration
working-directory: ./integration
Expand All @@ -174,7 +174,7 @@ jobs:
run: npm run test:integration:${{ matrix.test-name }}
env:
E2E_APP_CLERK_JS_DIR: ${{runner.temp}}
E2E_CLERK_VERSION: 'e2e'
E2E_CLERK_VERSION: 'latest'
INTEGRATION_INSTANCE_KEYS: ${{ secrets.INTEGRATION_INSTANCE_KEYS }}
MAILSAC_API_KEY: ${{ secrets.MAILSAC_API_KEY }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
run: npm run test:integration:${{ matrix.test-name }}
env:
E2E_APP_CLERK_JS_DIR: ${{runner.temp}}
E2E_CLERK_VERSION: 'e2e'
E2E_CLERK_VERSION: 'latest'
INTEGRATION_INSTANCE_KEYS: ${{ secrets.INTEGRATION_INSTANCE_KEYS }}
MAILSAC_API_KEY: ${{ secrets.MAILSAC_API_KEY }}
E2E_NEXTJS_VERSION: 'canary'
Expand Down
4 changes: 4 additions & 0 deletions verdaccio.install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ packages:
access: $all
publish: $all
proxy: npmjs
'gatsby-plugin-clerk':
access: $all
publish: $all
proxy: npmjs
'**':
access: $all
publish: $all
Expand Down
9 changes: 9 additions & 0 deletions verdaccio.publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,16 @@ storage: ./.verdaccio/storage
auth:
htpasswd:
file: ./.verdaccio/htpasswd
uplinks:
npmjs:
url: https://registry.npmjs.org/
packages:
'@clerk/*':
access: $all
publish: $all
'gatsby-plugin-clerk':
access: $all
publish: $all
'**':
access: $all
publish: $all
Expand Down
21 changes: 0 additions & 21 deletions verdaccio.yaml

This file was deleted.

0 comments on commit eaba239

Please sign in to comment.