0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-16 21:56:25 -05:00

chore: reuse workflows 5.x (#4854)

This commit is contained in:
Juan Picado 2024-09-22 16:39:38 +02:00 committed by GitHub
parent 207ebd905a
commit a712cd8b5c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 73 additions and 664 deletions

View file

@ -2,23 +2,10 @@ name: CI Lint
on: [push, pull_request]
permissions:
contents: read
jobs:
ci-lint:
name: Node Lint
lint:
uses: verdaccio/verdaccio/.github/workflows/yarn-ci-lint.yml@master
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: Use Node
uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2.5.2
with:
node-version-file: '.nvmrc'
- name: Install
run: yarn install --immutable
- name: Format
run: yarn format:check
- name: Lint
run: yarn lint
- name: Lint Lockfile
run: yarn lint:lockfile

View file

@ -14,6 +14,6 @@ jobs:
fail-fast: false
matrix:
node_version: [14, 16, 18, 19, 20, 21, 22]
uses: verdaccio/verdaccio/.github/workflows/yarn-ci.yml@ci-refactor
uses: verdaccio/verdaccio/.github/workflows/yarn-ci.yml@master
with:
node_version: ${{ matrix.node_version }}

View file

@ -1,24 +0,0 @@
name: Docker & Publish Pre-check
on: [push, pull_request]
jobs:
testDocker:
name: Test Docker Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: Build
run: docker build .
env:
VERDACCIO_BUILD_REGISTRY: https://registry.npmjs.org
testVerdaccio:
name: Test Verdaccio Publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: Publish
uses: verdaccio/github-actions/publish@f2e0370cfa5d74d24c325017b701bfddc9cc2e5d # tag=v0.4.0
with:
args: -d

View file

@ -20,37 +20,10 @@ on:
- 'v*'
jobs:
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
- uses: docker/setup-qemu-action@27d0a4f181a40b142cce983c5393082c365d1480 # tag=v1
- uses: docker/setup-buildx-action@v1
docker-publish:
secrets: inherit
uses: verdaccio/verdaccio/.github/workflows/shared-docker-publish.yml@master
with:
driver-opts: network=host
- uses: docker/login-action@v1
name: Login Docker Hub
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Prepare docker image tags
id: docker_meta
uses: crazy-max/ghaction-docker-meta@v1
with:
images: ${{ github.repository }}
tag-latest: false
tag-custom: 5.x-next
tag-custom-only: ${{ github.ref == 'refs/heads/5.x' }}
tag-latest: false
tag-semver: |
{{version}}
{{major}}
{{major}}.{{minor}}
- name: Build & Push
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}

View file

@ -1,155 +1,12 @@
on:
schedule:
- cron: '0 3 * * 5'
pull_request:
branches:
- '**'
push:
concurrency:
group: e2e-angular-${{ github.ref }}-5.x
cancel-in-progress: true
name: 'E2E Angular CLI with verdaccio'
jobs:
npm:
name: 'npm6:angular example'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: 'Use Node.js 18.x'
uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2.5.2
with:
node-version: 18.x
- name: 'install latest npm'
run: npm i -g npm@latest-6
- name: Install Dependencies
run: yarn install
- name: 'Run verdaccio in the background'
run: |
nohup yarn node ./scripts/run-verdaccio.js --config ./scripts/e2e-config.yaml &
- name: 'Ping to verdaccio'
run: |
npm ping --registry http://localhost:4873
- name: 'Running the integration test'
run: |
source scripts/e2e-setup-ci.sh
echo "registry=http://localhost:4873" > ~/.npmrc
npm config set loglevel="http"
npm config set fetch-retries="5"
npm config set fetch-retry-factor="50"
npm config set fetch-retry-mintimeout="20000"
npm config set fetch-retry-maxtimeout="80000"
npm install -g @angular/cli
ng new verdaccio-angular --interactive=false
cd verdaccio-angular
npm install @angular-devkit/core@next @babel/preset-env @babel/core -D
npm run ng build --aot
npm7:
name: 'npm7:angular example'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: 'Use Node.js 18.x'
uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2.5.2
with:
node-version: 18.x
- name: 'install latest npm'
run: npm i -g npm@next-7
- name: Install Dependencies
run: yarn install
- name: 'Run verdaccio in the background'
run: |
nohup yarn node ./scripts/run-verdaccio.js --config ./scripts/e2e-config.yaml &
- name: 'Ping to verdaccio'
run: |
npm ping --registry http://localhost:4873
- name: 'Running the integration test'
run: |
source scripts/e2e-setup-ci.sh
echo "registry=http://localhost:4873" > ~/.npmrc
npm config set loglevel="silent"
npm config set fetch-retries="5"
npm config set fetch-retry-factor="50"
npm config set fetch-retry-mintimeout="20000"
npm config set fetch-retry-maxtimeout="80000"
npm install -g @angular/cli
ng new verdaccio-angular --interactive=false
cd verdaccio-angular
npm install @angular-devkit/core@next @babel/preset-env @babel/core -D
npm run ng build --aot
npm8:
name: 'npm8:angular example'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: 'Use Node.js 18.x'
uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2.5.2
with:
node-version: 18.x
- name: 'install latest npm'
run: npm i -g npm@next-8
- name: Install Dependencies
run: yarn install
- name: 'Run verdaccio in the background'
run: |
nohup yarn node ./scripts/run-verdaccio.js --config ./scripts/e2e-config.yaml &
- name: 'Ping to verdaccio'
run: |
npm ping --registry http://localhost:4873
- name: 'Running the integration test'
run: |
source scripts/e2e-setup-ci.sh
echo "registry=http://localhost:4873" > ~/.npmrc
npm config set loglevel="silent"
npm config set fetch-retries="5"
npm config set fetch-retry-factor="50"
npm config set fetch-retry-mintimeout="20000"
npm config set fetch-retry-maxtimeout="80000"
npm install -g @angular/cli
ng new verdaccio-angular --interactive=false
cd verdaccio-angular
npm install @angular-devkit/core@next @babel/preset-env @babel/core -D
npm run ng build --aot
npm9:
name: 'npm9:angular example'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: 'Use Node.js 18.x'
uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2.5.2
with:
node-version: 18.x
- name: Install Dependencies
run: yarn install
- name: 'Run verdaccio in the background'
run: |
nohup yarn node ./scripts/run-verdaccio.js --config ./scripts/e2e-config.yaml &
- name: 'Ping to verdaccio'
run: |
npm ping --registry http://localhost:4873
- name: 'Running the integration test'
run: |
source scripts/e2e-setup-ci.sh
echo "registry=http://localhost:4873" > ~/.npmrc
npm config set loglevel="silent"
npm config set fetch-retries="5"
npm config set fetch-retry-factor="50"
npm config set fetch-retry-mintimeout="20000"
npm config set fetch-retry-maxtimeout="80000"
npm install -g @angular/cli
ng new verdaccio-angular --interactive=false
cd verdaccio-angular
npm install @angular-devkit/core@next @babel/preset-env @babel/core -D
npm run ng build --aot
e2e:
uses: verdaccio/verdaccio/.github/workflows/x-e2e-angular-cli-workflow.yml@master

View file

@ -1,79 +1,12 @@
on:
schedule:
- cron: '0 3 * * 5'
pull_request:
branches:
- '**'
push:
concurrency:
group: e2e-gastbyjs-${{ github.ref }}-5.x
cancel-in-progress: true
name: 'E2E Gatsby.js CLI with verdaccio'
jobs:
npm6:
name: 'npm6:gatsby example'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: 'Use Node.js 18.x'
uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2.5.2
with:
node-version: 18.x
- name: 'install npm 6'
run: npm i -g npm@latest-6
- name: Install Dependencies
run: yarn install
- name: 'Run verdaccio in the background'
run: |
nohup yarn node ./scripts/run-verdaccio.js --config ./scripts/e2e-config.yaml &
- name: 'Ping to verdaccio'
run: |
npm ping --registry http://localhost:4873
- name: 'Running the integration test'
run: |
source scripts/e2e-setup-ci.sh
echo "registry=http://localhost:4873
loglevel="warn"
fetch-retries=10
fetch-retry-factor=2
fetch-retry-mintimeout=10000
fetch-retry-maxtimeout=80000" > ~/.npmrc
npm config list
npm i -g gatsby@4.24.7
gatsby new my-gatsby
cd my-gatsby
npm run build
npm9:
name: 'npm9:gatsby example'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: 'Use Node.js 18.x'
uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2.5.2
with:
node-version: 18.x
- name: 'install npm 9'
run: npm i -g npm@9.4.2
- name: Install Dependencies
run: yarn install
- name: 'Run verdaccio in the background'
run: |
nohup yarn node ./scripts/run-verdaccio.js --config ./scripts/e2e-config.yaml &
- name: 'Ping to verdaccio'
run: |
npm ping --registry http://localhost:4873
- name: 'Running the integration test'
run: |
source scripts/e2e-setup-ci.sh
echo "registry=http://localhost:4873
loglevel="warn"
fetch-retries=10
fetch-retry-factor=2
fetch-retry-mintimeout=10000
fetch-retry-maxtimeout=80000" > ~/.npmrc
npm config list
npm i -g gatsby@5.6.0
gatsby new my-gatsby
cd my-gatsby
npm run build
e2e:
uses: verdaccio/verdaccio/.github/workflows/x-e2e-gatsbyjs-cli-workflow.yml@master

View file

@ -1,238 +1,12 @@
on:
schedule:
- cron: '0 3 * * 5'
pull_request:
branches:
- '**'
push:
concurrency:
group: e2e-jest-${{ github.ref }}-5.x
cancel-in-progress: true
name: 'E2E Jest with verdaccio'
jobs:
yarn:
name: 'yarn:jest example'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: 'Use Node.js 16.x'
uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2.5.2
with:
node-version: 16.x
- name: Install Dependencies
run: yarn install
- name: 'Run verdaccio in the background'
run: |
nohup yarn node ./scripts/run-verdaccio.js --config ./scripts/e2e-config.yaml &
- name: 'Ping to verdaccio'
run: |
npm ping --registry http://localhost:4873
- name: 'Running the integration test'
run: |
source scripts/e2e-setup-ci.sh
yarn init --yes
yarn add jest@29.5.0 --registry http://localhost:4873
echo "it('should pass', () => { expect(true).toBeTruthy(); });" | tee pass.test.js
yarn jest pass.test.js
yarn add left-pad --registry http://localhost:4873 --verbose
echo "const leftPad = require('left-pad'); it('should resolve a module', () => { expect(typeof leftPad).toBe('function');});" | tee module.test.js
yarn jest module.test.js
yarn-modern:
name: 'yarn2:jest example'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: 'Use Node.js 18.x'
uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2.5.2
with:
node-version: 18.x
- name: Install Dependencies
run: yarn install
- name: 'Run verdaccio in the background'
run: |
nohup yarn node ./scripts/run-verdaccio.js --config ./scripts/e2e-config.yaml &
- name: 'Ping to verdaccio'
run: |
npm ping --registry http://localhost:4873
- name: 'Running the integration test'
run: |
source scripts/e2e-setup-ci.sh
yarn init --yes
yarn set version berry
yarn config set npmRegistryServer "http://localhost:4873"
yarn config set unsafeHttpWhitelist --json '["localhost"]'
yarn add jest@29.5.0
echo "it('should pass', () => { expect(true).toBeTruthy(); });" | tee pass.test.js
yarn jest pass.test.js
yarn add left-pad
echo "const leftPad = require('left-pad'); it('should resolve a module', () => { expect(typeof leftPad).toBe('function');});" | tee module.test.js
yarn jest module.test.js
npm:
name: 'npm:jest example'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: 'Use Node.js 16.x'
uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2.5.2
with:
node-version: 16.x
- name: 'install latest npm'
run: npm i -g npm@latest-6
- name: Install Dependencies
run: yarn install
- name: 'Run verdaccio in the background'
run: |
nohup yarn node ./scripts/run-verdaccio.js --config ./scripts/e2e-config.yaml &
- name: 'Ping to verdaccio'
run: |
npm ping --registry http://localhost:4873
- name: 'Running the integration test'
run: |
source scripts/e2e-setup-ci.sh
npm init --force
npm install jest@29.5.0 --registry http://localhost:4873
echo "it('should pass', () => { expect(true).toBeTruthy(); });" | tee pass.test.js
yarn jest pass.test.js
yarn add left-pad --registry http://localhost:4873 --verbose
echo "const leftPad = require('left-pad'); it('should resolve a module', () => { expect(typeof leftPad).toBe('function');});" | tee module.test.js
yarn jest module.test.js
npm8:
name: 'npm8:jest example'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: 'Use Node.js 16.x'
uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2.5.2
with:
node-version: 16.x
- name: 'install latest npm'
run: npm i -g npm@next-8
- name: Install Dependencies
run: yarn install
- name: 'Run verdaccio in the background'
run: |
nohup yarn node ./scripts/run-verdaccio.js --config ./scripts/e2e-config.yaml &
- name: 'Ping to verdaccio'
run: |
npm ping --registry http://localhost:4873
- name: 'Running the integration test'
run: |
source scripts/e2e-setup-ci.sh
npm init --force
npm install jest@29.5.0 --registry http://localhost:4873
echo "it('should pass', () => { expect(true).toBeTruthy(); });" | tee pass.test.js
yarn jest pass.test.js
yarn add left-pad --registry http://localhost:4873 --verbose
echo "const leftPad = require('left-pad'); it('should resolve a module', () => { expect(typeof leftPad).toBe('function');});" | tee module.test.js
yarn jest module.test.js
npm9:
name: 'npm9:jest example'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: 'Use Node.js 18.x'
uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2.5.2
with:
node-version: 18.x
- name: Install Dependencies
run: yarn install
- name: 'Run verdaccio in the background'
run: |
nohup yarn node ./scripts/run-verdaccio.js --config ./scripts/e2e-config.yaml &
- name: 'Ping to verdaccio'
run: |
npm ping --registry http://localhost:4873
- name: 'Running the integration test'
run: |
source scripts/e2e-setup-ci.sh
npm init --force
npm install jest@29.4.2 --registry http://localhost:4873
echo "it('should pass', () => { expect(true).toBeTruthy(); });" | tee pass.test.js
yarn jest pass.test.js
yarn add left-pad --registry http://localhost:4873 --verbose
echo "const leftPad = require('left-pad'); it('should resolve a module', () => { expect(typeof leftPad).toBe('function');});" | tee module.test.js
yarn jest module.test.js
pnpm6:
name: 'pnpm:latest-6:jest example'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: 'Use Node.js 16.x'
uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2.5.2
with:
node-version: 16.x
- name: 'install latest pnpm'
run: npm i -g pnpm@latest-6
- name: Install Dependencies
run: yarn install
- name: 'Run verdaccio in the background'
run: |
nohup yarn node ./scripts/run-verdaccio.js &
- name: 'Ping to verdaccio'
run: |
pnpm ping --registry http://localhost:4873
- name: 'Running the integration test'
run: |
source scripts/e2e-setup-ci.sh
pnpm init --force
pnpm install jest@29.5.0 --registry http://localhost:4873
echo "it('should pass', () => { expect(true).toBeTruthy(); });" | tee pass.test.js
yarn jest pass.test.js
yarn add left-pad --registry http://localhost:4873 --verbose
echo "const leftPad = require('left-pad'); it('should resolve a module', () => { expect(typeof leftPad).toBe('function');});" | tee module.test.js
yarn jest module.test.js
pnpm7:
name: 'pnpm:7:jest example'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: 'Use Node.js 16.x'
uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2.5.2
with:
node-version: 16.x
- name: 'install latest pnpm'
run: npm i -g pnpm@latest-7
- name: Install Dependencies
run: yarn install
- name: 'Run verdaccio in the background'
run: |
yarn node ./scripts/run-verdaccio.js &
- name: 'Ping to verdaccio'
run: |
pnpm ping --registry http://localhost:4873
- name: 'Running the integration test'
run: |
source scripts/e2e-setup-ci.sh
pnpm init
pnpm install jest@29.5.0 --registry http://localhost:4873
echo "it('should pass', () => { expect(true).toBeTruthy(); });" | tee pass.test.js
yarn jest pass.test.js
yarn add left-pad --registry http://localhost:4873 --verbose
echo "const leftPad = require('left-pad'); it('should resolve a module', () => { expect(typeof leftPad).toBe('function');});" | tee module.test.js
yarn jest module.test.js
e2e:
uses: verdaccio/verdaccio/.github/workflows/x-e2e-jest-workflow.yml@master

View file

@ -1,13 +0,0 @@
name: Test local registry for js vulnerabilities
on:
schedule:
- cron: '0 */4 1 * *'
jobs:
security:
runs-on: ubuntu-latest
steps:
- name: Test for public javascript library vulnerabilities
uses: lirantal/is-website-vulnerable@02d7916b29a1fd9d6a9bea0d83960d4288afa1a6 # tag=1.15.10
with:
scan-url: "https://registry.verdaccio.org"

View file

@ -6,27 +6,6 @@ on:
branches:
- 5.x
jobs:
release:
name: Release Snapshot
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: Use Node (latest)
uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2.5.2
with:
node-version-file: '.nvmrc'
- name: Install
run: yarn install
- name: Build
run: yarn build
- name: Declare some variables
shell: bash
run: |
echo "sha_short=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV"
- name: Bump up package
run: npm version prerelease --no-git-tag-version --preid ${{ env.sha_short }}
- name: Publish
run: sh scripts/publish-prerelease.sh
env:
REGISTRY_AUTH_TOKEN: ${{ secrets.VERDACCIO_REGISTRY_TOKEN_CANARY }}
REGISTRY_URL: registry.verdaccio.org
snapshot:
secrets: inherit
uses: verdaccio/verdaccio/.github/workflows/x-release-snapshot.yml@master

View file

@ -1,31 +1,10 @@
name: Release 5.x
name: Release
on:
push:
tags:
- '*'
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: Use Node (latest)
uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2.5.2
with:
node-version-file: '.nvmrc'
- name: Install
run: yarn install
- name: Build
run: yarn build
- name: Types
run: yarn code:types
- name: Publish
run: sh scripts/publish.sh
env:
REGISTRY_AUTH_TOKEN: ${{ secrets.REGISTRY_AUTH_TOKEN }}
REGISTRY_URL: registry.npmjs.org
- name: Create release notes
run: sh scripts/github-release.sh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
snapshot:
secrets: inherit
uses: verdaccio/verdaccio/.github/workflows/x-release.yml@master

View file

@ -1,26 +0,0 @@
name: Docker Smoke Test 5.x
on:
workflow_dispatch:
push:
branches:
- 5.x
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3
with:
node-version: 18
- name: Docker test
run: |
docker run -d -it --rm --name verdaccio -p 4873:4873 verdaccio/verdaccio:5
- name: verdaccio cli
run: npm install -g verdaccio --registry http://localhost:4873
- name: gastby cli
run: npm install -g gatsby-cli --registry http://localhost:4873
- name: netlify cli
run: npm install -g netlify-cli --registry http://localhost:4873
- name: angular cli
run: npm install -g @angular/cli --registry http://localhost:4873

View file

@ -1,41 +0,0 @@
name: Module Smoke Test Node.js 14
on:
workflow_dispatch:
pull_request:
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: Use Node
uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2.5.2
with:
node-version: 14
- name: Docker test
run: |
docker run -d -it --rm --name verdaccio -p 4873:4873 verdaccio/verdaccio:5
- name: login
run: npx npm-cli-login -u test -p 1234 -e test@domain.test -r http://localhost:4873
- name: Build
run: yarn && 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@27.5.1 --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

17
.github/workflows/smoke-test-docker.yml vendored Normal file
View file

@ -0,0 +1,17 @@
name: Docker Smoke Test
on:
workflow_dispatch:
push:
permissions:
contents: read
concurrency:
group: e2e-docker-pkgs-${{ github.ref }}-5.x
cancel-in-progress: true
jobs:
smoke:
uses: verdaccio/verdaccio/.github/workflows/x-smok-test-docker.yml@master
with:
docker_tag: '5.x-next'

View file

@ -0,0 +1,7 @@
name: Test Docker Build
on: [push, pull_request]
jobs:
testDocker:
uses: verdaccio/verdaccio/.github/workflows/test-docker-build.yml@master

View file

@ -0,0 +1,7 @@
name: Test Publish Package
on: [push, pull_request]
jobs:
testVerdaccio:
uses: verdaccio/verdaccio/.github/workflows/test-publish-package.yml@master