2024-09-22 09:16:53 -05:00
|
|
|
on:
|
|
|
|
workflow_call:
|
|
|
|
inputs:
|
|
|
|
docker_tag:
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
description: 'Docker tag to use for the verdaccio image'
|
|
|
|
default: '5'
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-11-02 04:02:18 -05:00
|
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
2024-09-22 09:16:53 -05:00
|
|
|
- name: Use Node (latest)
|
2024-11-02 05:38:10 -05:00
|
|
|
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
2024-09-22 09:16:53 -05:00
|
|
|
with:
|
|
|
|
node-version-file: '.nvmrc'
|
|
|
|
- name: Docker test
|
|
|
|
run: |
|
|
|
|
docker run -d -it --rm --name verdaccio -p 4873:4873 verdaccio/verdaccio:${{ inputs.docker_tag }}
|
|
|
|
- name: login
|
|
|
|
run: npx npm-cli-login -u test -p 1234 -e test@domain.test -r http://localhost:4873
|
|
|
|
- name: Install
|
|
|
|
run: yarn
|
|
|
|
- name: Build
|
|
|
|
run: yarn build
|
|
|
|
- name: Types
|
|
|
|
run: yarn code:types
|
|
|
|
- name: Bump up package
|
|
|
|
run: npm version prerelease --no-git-tag-version --preid $(date +%s%N)
|
|
|
|
- name: publish verdaccio
|
|
|
|
run: npm publish --registry http://localhost:4873
|
|
|
|
- name: install verdaccio
|
|
|
|
run: npm i -g verdaccio --loglevel info --registry http://localhost:4873
|
|
|
|
- name: verdaccio version
|
|
|
|
run: verdaccio --version
|
|
|
|
- name: 'Running the integration test'
|
|
|
|
run: |
|
|
|
|
source scripts/e2e-setup-ci.sh
|
|
|
|
npm init --force
|
|
|
|
npm install jest --registry http://localhost:4873
|
|
|
|
npm install verdaccio --registry http://localhost:4873
|
|
|
|
echo "test('require module should works', () => { const {runServer} = require('verdaccio') });" | tee module.spec.js
|
|
|
|
cat module.spec.js
|
|
|
|
yarn jest
|