0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-30 22:34:10 -05:00

chore: reuse workflows 7.x (#4853)

This commit is contained in:
Juan Picado 2024-09-22 16:45:38 +02:00 committed by GitHub
parent ffeea463c8
commit 0d5289bf33
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 102 additions and 679 deletions

View file

@ -2,23 +2,10 @@ name: CI Lint
on: [push, pull_request] on: [push, pull_request]
permissions:
contents: read
jobs: jobs:
ci-lint: lint:
name: Node 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

@ -5,32 +5,15 @@ on: [push, pull_request]
permissions: permissions:
contents: read contents: read
concurrency: concurrency:
group: ci-${{ github.ref }} group: ci-${{ github.ref }}-7.x
cancel-in-progress: true cancel-in-progress: true
jobs: jobs:
ci: build:
name: Node ${{ matrix.node_version }}
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
# only suported versions defined at https://nodejs.org/en/about/previous-releases node_version: [20, 22]
node_version: [20, 21] # 22 excluded for now, fails on yarn install uses: verdaccio/verdaccio/.github/workflows/yarn-ci.yml@master
with:
runs-on: ubuntu-latest node_version: ${{ matrix.node_version }}
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: Use Node ${{ matrix.node_version }}
uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2.5.2
with:
node-version: ${{ matrix.node_version }}
- name: Install
run: yarn install --immutable
- name: Build
run: yarn build
- name: Types
run: yarn code:types
- name: Test
run: yarn test

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

@ -1,4 +1,4 @@
name: Docker publish to docker.io (7.x) name: Docker publish to docker.io
on: on:
push: push:
@ -20,37 +20,10 @@ on:
- 'v*' - 'v*'
jobs: jobs:
docker: docker-publish:
runs-on: ubuntu-latest secrets: inherit
steps: uses: verdaccio/verdaccio/.github/workflows/shared-docker-publish.yml@master
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3 with:
- uses: docker/setup-qemu-action@27d0a4f181a40b142cce983c5393082c365d1480 # tag=v1 tag-latest: false
- uses: docker/setup-buildx-action@v1 tag-custom: 7.x-next
with: tag-custom-only: ${{ github.ref == 'refs/heads/7.x' }}
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-custom: 7.x-next
tag-custom-only: ${{ github.ref == 'refs/heads/7.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,117 +1,12 @@
on: on:
pull_request: pull_request:
branches: push:
- '**'
concurrency:
group: e2e-angular-${{ github.ref }}-7.x
cancel-in-progress: true
name: 'E2E Angular CLI with verdaccio' name: 'E2E Angular CLI with verdaccio'
jobs: jobs:
npm8: e2e:
name: 'npm8:angular example' uses: verdaccio/verdaccio/.github/workflows/x-e2e-angular-cli-workflow.yml@master
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: 'Use Node.js'
uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2.5.2
with:
node-version-file: '.nvmrc'
- 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'
uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2.5.2
with:
node-version-file: '.nvmrc'
- name: 'install latest npm 9'
run: npm i -g npm@next-9
- 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
npm10:
name: 'npm10:angular example'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: 'Use Node.js'
uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2.5.2
with:
node-version-file: '.nvmrc'
- name: 'install latest npm 10'
run: npm i -g npm@next-10
- 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="info"
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

View file

@ -1,34 +1,12 @@
on: on:
pull_request: pull_request:
branches: push:
- '**'
concurrency:
group: e2e-audit-${{ github.ref }}-7.x
cancel-in-progress: true
name: 'Plugin Audit E2E' name: 'Plugin Audit E2E'
jobs: jobs:
npm10: e2e:
name: 'npm10:audit example' uses: verdaccio/verdaccio/.github/workflows/x-e2e-audit-workflow.yml@master
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: 'Use Node.js'
uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2.5.2
with:
node-version-file: '.nvmrc'
- name: 'install latest npm 10'
run: npm i -g npm@next-10
- 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 --yes
npm install next --registry http://localhost:4873 --loglevel info
npm audit

View file

@ -1,77 +1,12 @@
on: on:
pull_request: pull_request:
branches: push:
- '**'
concurrency:
group: e2e-gastbyjs-${{ github.ref }}-7.x
cancel-in-progress: true
name: 'E2E Gatsby.js CLI with verdaccio' name: 'E2E Gatsby.js CLI with verdaccio'
jobs: jobs:
npm9: e2e:
name: 'npm9:gatsby example' uses: verdaccio/verdaccio/.github/workflows/x-e2e-gatsbyjs-cli-workflow.yml@master
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: 'Use Node.js'
uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2.5.2
with:
node-version-file: '.nvmrc'
- name: 'install npm 9'
run: npm i -g npm@next-9
- 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="info"
fetch-retries=10
fetch-retry-factor=2
fetch-retry-mintimeout=10000
fetch-retry-maxtimeout=80000" > ~/.npmrc
npm config list
npm i -g gatsby@latest
gatsby new my-gatsby
cd my-gatsby
npm run build
npm10:
name: 'npm10:gatsby example'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: 'Use Node.js'
uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2.5.2
with:
node-version-file: '.nvmrc'
- name: 'install npm 10'
run: npm i -g npm@next-10
- 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="info"
fetch-retries=10
fetch-retry-factor=2
fetch-retry-mintimeout=10000
fetch-retry-maxtimeout=80000" > ~/.npmrc
npm config list
npm i -g gatsby@latest
gatsby new my-gatsby
cd my-gatsby
npm run build

View file

@ -1,237 +1,12 @@
on: on:
pull_request: pull_request:
branches: push:
- '**'
concurrency:
group: e2e-jest-${{ github.ref }}-7.x
cancel-in-progress: true
name: 'E2E Jest with verdaccio' name: 'E2E Jest with verdaccio'
jobs: jobs:
yarn: e2e:
name: 'yarn:jest example' uses: verdaccio/verdaccio/.github/workflows/x-e2e-jest-workflow.yml@master
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: 'Use Node.js'
uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2.5.2
with:
node-version-file: '.nvmrc'
- 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
yarn2:
name: 'yarn2:jest example'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: 'Use Node.js'
uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2.5.2
with:
node-version-file: '.nvmrc'
- 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
npm8:
name: 'npm8:jest example'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: 'Use Node.js'
uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2.5.2
with:
node-version-file: '.nvmrc'
- 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 --yes
npm install jest@29.5.0 --registry http://localhost:4873 --loglevel info
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'
uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2.5.2
with:
node-version-file: '.nvmrc'
- name: 'install latest npm 9'
run: npm i -g npm@next-9
- 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 --yes
npm install jest@29.4.2 --registry http://localhost:4873 --loglevel info
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
npm10:
name: 'npm10:jest example'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: 'Use Node.js'
uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2.5.2
with:
node-version-file: '.nvmrc'
- name: 'install latest npm 10'
run: npm i -g npm@next-10
- 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 --yes
npm install jest@29.4.2 --registry http://localhost:4873 --loglevel info
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
pnpm8:
name: 'pnpm8:jest example'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: 'Use Node.js'
uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2.5.2
with:
node-version-file: '.nvmrc'
- name: 'install latest pnpm'
run: npm i -g pnpm@latest-8
- 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
pnpm install jest@29.5.0 --registry http://localhost:4873 --loglevel info
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
pnpm9:
name: 'pnpm:9:jest example'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: 'Use Node.js'
uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2.5.2
with:
node-version-file: '.nvmrc'
- name: 'install latest pnpm'
run: npm i -g pnpm@latest-9
- 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 --loglevel info
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

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

@ -5,29 +5,7 @@ on:
push: push:
branches: branches:
- 7.x - 7.x
- 'canary/**'
jobs: jobs:
release: snapshot:
name: Release Snapshot secrets: inherit
runs-on: ubuntu-latest uses: verdaccio/verdaccio/.github/workflows/x-release-snapshot.yml@ci-refactor
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

View file

@ -5,27 +5,7 @@ on:
tags: tags:
- '*' - '*'
jobs: jobs:
release: snapshot:
name: Release secrets: inherit
runs-on: ubuntu-latest uses: verdaccio/verdaccio/.github/workflows/x-release.yml@master
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 }}

View file

@ -1,29 +0,0 @@
name: Docker Smoke Test 7.x
on:
workflow_dispatch:
push:
branches:
- 7.x
schedule:
# run every sunday
- cron: '0 0 * * 0'
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3
with:
node-version: 20
- 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,43 +0,0 @@
name: Module Smoke Test 7.x
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 (latest)
uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2.5.2
with:
node-version-file: '.nvmrc'
- 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: 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

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 }}-7.x
cancel-in-progress: true
jobs:
smoke:
uses: verdaccio/verdaccio/.github/workflows/x-smok-test-docker.yml@master
with:
docker_tag: '7.x-next'

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

@ -0,0 +1,17 @@
name: Module Smoke Test
on:
workflow_dispatch:
push:
permissions:
contents: read
concurrency:
group: e2e-test-pkgs-${{ github.ref }}-7.x
cancel-in-progress: true
jobs:
smoke:
uses: verdaccio/verdaccio/.github/workflows/x-smok-test-module.yml@master
with:
docker_tag: '7.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