mirror of
https://github.com/verdaccio/verdaccio.git
synced 2025-01-20 22:52:46 -05:00
chore: add test for require module (#3710)
This commit is contained in:
parent
6944b7de35
commit
aec4e700ba
2 changed files with 47 additions and 71 deletions
70
.github/workflows/e2e-angular-cli-workflow.yml
vendored
70
.github/workflows/e2e-angular-cli-workflow.yml
vendored
|
@ -7,40 +7,6 @@ on:
|
|||
|
||||
name: 'E2E Angular CLI with verdaccio'
|
||||
jobs:
|
||||
# todo: fix yarn global issue, cannot find ng
|
||||
# yarn:
|
||||
# name: 'yarn:angular example'
|
||||
# runs-on: ubuntu-latest
|
||||
|
||||
# steps:
|
||||
# - uses: actions/checkout@v2.3.3
|
||||
|
||||
# - name: 'Use Node.js 14.x'
|
||||
# uses: actions/setup-node@v2.1.5
|
||||
# with:
|
||||
# node-version: 14.x
|
||||
# - name: Install Dependencies
|
||||
# run: yarn install --pure-lockfile
|
||||
# - name: 'Run verdaccio in the background'
|
||||
# run: |
|
||||
# nohup yarn node ./scripts/run-verdaccio.js &
|
||||
# - 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 global add @angular/cli
|
||||
# which nodemon
|
||||
# ng new verdaccio-angular --interactive=false
|
||||
|
||||
# cd verdaccio-angular
|
||||
# echo "registry=http://localhost:4873" > ~/.npmrc
|
||||
# yarn add @angular-devkit/core@next @babel/preset-env @babel/core -D
|
||||
|
||||
# ng build --aot
|
||||
npm:
|
||||
name: 'npm6:angular example'
|
||||
runs-on: ubuntu-latest
|
||||
|
@ -189,39 +155,3 @@ jobs:
|
|||
npm install @angular-devkit/core@next @babel/preset-env @babel/core -D
|
||||
|
||||
npm run ng build --aot
|
||||
|
||||
# pnpm throws errors worth to check why
|
||||
# pnpm:
|
||||
# name: 'pnpm:angular example'
|
||||
# runs-on: ubuntu-latest
|
||||
#
|
||||
# steps:
|
||||
# - uses: actions/checkout@v2.3.3
|
||||
#
|
||||
# - name: 'Use Node.js 10.x'
|
||||
# uses: actions/setup-node@v2.1.1
|
||||
# with:
|
||||
# node-version: 10.x
|
||||
# - name: 'install latest pnpm'
|
||||
# run: npm i -g pnpm
|
||||
# - name: Install Dependencies
|
||||
# run: yarn install --pure-lockfile
|
||||
# - 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 -g @angular/cli
|
||||
# ng new verdaccio-angular --interactive=false
|
||||
#
|
||||
# cd verdaccio-angular
|
||||
# echo "registry=http://localhost:4873" > ~/.npmrc
|
||||
# pnpm install @angular-devkit/core@next @babel/preset-env @babel/core -D
|
||||
#
|
||||
# pnpm run ng build --aot
|
||||
|
|
46
.github/workflows/smok-test-module.yml
vendored
Normal file
46
.github/workflows/smok-test-module.yml
vendored
Normal file
|
@ -0,0 +1,46 @@
|
|||
name: Module 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@8c91899e586c5b171469028077307d293428b516 # tag=v3
|
||||
with:
|
||||
node-version: 18
|
||||
- name: Docker test
|
||||
run: |
|
||||
docker run -d -it --rm --name verdaccio -p 4873:4873 verdaccio/verdaccio:5.x-next
|
||||
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3.0.2
|
||||
- name: 'Use Node.js 18.x'
|
||||
uses: actions/setup-node@1f8c6b94b26d0feae1e387ca63ccbdc44d27b561 # tag=v2.5.1
|
||||
with:
|
||||
node-version: 18.x
|
||||
- name: login
|
||||
run: npx npm-cli-login -u test -p 1234 -e test@domain.test -r http://localhost:4873
|
||||
- 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
|
Loading…
Add table
Reference in a new issue