Skip to content

Commit

Permalink
ci: mv npm token to int test
Browse files Browse the repository at this point in the history
  • Loading branch information
antongolub committed Jun 17, 2022
1 parent 2d38231 commit e38ecd3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 15 deletions.
17 changes: 3 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,7 @@ jobs:

- name: Run tests
timeout-minutes: 2
env:
VERDACCIO_TOKEN: ${{ secrets.VERDACCIO_TOKEN }}
run: |
echo "//localhost:4873/:_authToken=${VERDACCIO_TOKEN}" >> .npmrc
yarn test
run: yarn test

test_pr:
if: ${{ needs.init.outputs.skip == 'false' && github.event_name == 'pull_request' }}
Expand All @@ -63,11 +59,7 @@ jobs:

- name: Run tests
timeout-minutes: 2
env:
VERDACCIO_TOKEN: ${{ secrets.VERDACCIO_TOKEN }}
run: |
echo "//localhost:4873/:_authToken=${VERDACCIO_TOKEN}" >> .npmrc
yarn test
run: yarn test

release:
name: Release
Expand Down Expand Up @@ -103,13 +95,10 @@ jobs:
run: |
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> .npmrc
echo "//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}" >> .npmrc
echo "//localhost:4873/:_authToken=${VERDACCIO_TOKEN}" >> .npmrc
- name: Run tests
timeout-minutes: 2
run: |
echo "//localhost:4873/:_authToken=${VERDACCIO_TOKEN}" >> .npmrc
yarn test
run: yarn test

- name: Docs
run: yarn docs
Expand Down
5 changes: 4 additions & 1 deletion src/test/js/test-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url))
export const fixtures = path.resolve(__dirname, '../fixtures')

export const createNpmRegistry = () => {
let p
const VERDACCIO_TOKEN = 'mRv6eIuiaggXGb9ZDFCtBA=='
$.cwd = path.resolve(__dirname, '../../../')
$.raw`echo "//localhost:4873/:_authToken=${VERDACCIO_TOKEN}" >> .npmrc`

let p
return {
address: 'http://localhost:4873/',
async start() {
Expand Down

0 comments on commit e38ecd3

Please sign in to comment.