2024-06-16 11:36:20 -05:00
|
|
|
name: E2E Generator Verdaccio Plugin
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
workflow_dispatch:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- 'master'
|
2024-08-03 03:35:46 -05:00
|
|
|
|
|
|
|
concurrency:
|
|
|
|
group: generator-plugin-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2024-06-16 11:36:20 -05:00
|
|
|
jobs:
|
|
|
|
e2e-plugin-generator:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2024-07-23 15:33:52 -05:00
|
|
|
node-version: [18,20, 21]
|
2024-06-16 11:36:20 -05:00
|
|
|
steps:
|
2024-11-02 04:02:18 -05:00
|
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
2024-06-16 11:36:20 -05:00
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
2024-11-02 05:38:10 -05:00
|
|
|
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
2024-06-16 11:36:20 -05:00
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
- name: Install pnpm
|
|
|
|
run: |
|
|
|
|
corepack enable
|
|
|
|
corepack install
|
2024-11-02 06:01:14 -05:00
|
|
|
- uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.0.2
|
2024-06-16 11:36:20 -05:00
|
|
|
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
|
2024-07-07 12:33:22 -05:00
|
|
|
run: npm install -g yo@4 --loglevel=info
|
2024-06-16 11:36:20 -05:00
|
|
|
- name: install generator
|
2024-07-07 12:33:22 -05:00
|
|
|
run: npm install -g generator-verdaccio-plugin --loglevel=info --registry http://localhost:4873
|
2024-06-16 11:36:20 -05:00
|
|
|
# Future: add a test to verify the plugin is working with prompt
|