mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-30 22:34:10 -05:00
chore: e2e plugin generator (#4686)
This commit is contained in:
parent
8be0d4882e
commit
e54fc76f8e
2 changed files with 86 additions and 0 deletions
47
.github/workflows/plugin-generator-e2e.yaml
vendored
Normal file
47
.github/workflows/plugin-generator-e2e.yaml
vendored
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
name: E2E Generator Verdaccio Plugin
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- 'master'
|
||||||
|
jobs:
|
||||||
|
e2e-plugin-generator:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
node-version: [18,20, 22]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: ${{ matrix.node-version }}
|
||||||
|
- name: Install pnpm
|
||||||
|
run: |
|
||||||
|
corepack enable
|
||||||
|
corepack install
|
||||||
|
- uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: ~/.pnpm-store
|
||||||
|
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
||||||
|
- name: install
|
||||||
|
run: pnpm install
|
||||||
|
- name: build
|
||||||
|
run: pnpm build
|
||||||
|
- name: install verdaccio
|
||||||
|
run: npm install -g verdaccio@5
|
||||||
|
- name: Start server
|
||||||
|
run: verdaccio -c e2e/docker/generator-e2e/generator.yaml &
|
||||||
|
- name: ping server
|
||||||
|
run: curl http://localhost:4873/-/ping
|
||||||
|
- name: login
|
||||||
|
run: npx npm-cli-login -u test -p test -e test@domain.test -r http://localhost:4873
|
||||||
|
- name: publish
|
||||||
|
run: pnpm local:publish
|
||||||
|
- name: install yeoman
|
||||||
|
run: npm install -g yo@4
|
||||||
|
- name: install generator
|
||||||
|
run: npm install -g generator-verdaccio-plugin --registry http://localhost:4873
|
||||||
|
# Future: add a test to verify the plugin is working with prompt
|
39
e2e/docker/generator-e2e/generator.yaml
Normal file
39
e2e/docker/generator-e2e/generator.yaml
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
storage: ./storage
|
||||||
|
|
||||||
|
web:
|
||||||
|
title: Verdaccio E2E Local
|
||||||
|
auth:
|
||||||
|
htpasswd:
|
||||||
|
file: ./htpasswd
|
||||||
|
uplinks:
|
||||||
|
npmjs:
|
||||||
|
url: https://registry.npmjs.org/
|
||||||
|
packages:
|
||||||
|
'@verdaccio/*':
|
||||||
|
access: $all
|
||||||
|
publish: $all
|
||||||
|
unpublish: $all
|
||||||
|
'@*/*':
|
||||||
|
access: $all
|
||||||
|
publish: $authenticated
|
||||||
|
unpublish: $authenticated
|
||||||
|
proxy: npmjs
|
||||||
|
'verdaccio-*':
|
||||||
|
access: $all
|
||||||
|
publish: $all
|
||||||
|
unpublish: $all
|
||||||
|
'verdaccio':
|
||||||
|
access: $all
|
||||||
|
publish: $all
|
||||||
|
unpublish: $all
|
||||||
|
'**':
|
||||||
|
access: $all
|
||||||
|
publish: $authenticated
|
||||||
|
unpublish: $authenticated
|
||||||
|
proxy: npmjs
|
||||||
|
|
||||||
|
middlewares:
|
||||||
|
audit:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
log: { type: stdout, format: json, level: http }
|
Loading…
Reference in a new issue