mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-16 21:56:25 -05:00
chore: reuse workflows configurations (#4965)
* build test test test Update action.yml Update action.yml test test Update action.yml Update action.yml Update action.yml test test Update ci.yml Update ci.yml test test test test Update action.yml test Update ci.yml Update e2e-ci.yml test * Update ci.yml * Update plugin-generator-e2e.yaml * test * test * test * test * Update e2e-ci.yml * Update e2e-ui.yml * test * Update ci.yml * Update ci.yml * Update action.yml * Update action.yml * Update package.json * Update static-data.yml * Update static-data.yml * Update website.yml * test * Update ui-components.yml * Update ui-components.yml * Update ui-components.yml
This commit is contained in:
parent
ac1056025d
commit
47e6ce9083
13 changed files with 212 additions and 283 deletions
22
.github/actions/build-app/action.yml
vendored
Normal file
22
.github/actions/build-app/action.yml
vendored
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
name: 'Build app'
|
||||||
|
description: 'build verdaccio application'
|
||||||
|
|
||||||
|
inputs:
|
||||||
|
registry-url:
|
||||||
|
description: 'Registry URL for pnpm'
|
||||||
|
required: false
|
||||||
|
default: 'http://localhost:4873'
|
||||||
|
node-version:
|
||||||
|
description: 'Node.js version to use'
|
||||||
|
required: true
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: composite
|
||||||
|
steps:
|
||||||
|
- name: Install dependencies with a custom registry version ${{ inputs.node-version }}
|
||||||
|
uses: ./.github/actions/install-app-node
|
||||||
|
with:
|
||||||
|
node-version: ${{ inputs.node_version }}
|
||||||
|
- name: build
|
||||||
|
run: pnpm build
|
||||||
|
shell: bash
|
12
.github/actions/cache-packages/action.yml
vendored
Normal file
12
.github/actions/cache-packages/action.yml
vendored
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
name: 'Cache packages'
|
||||||
|
description: 'get or set cache packages'
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: composite
|
||||||
|
steps:
|
||||||
|
- name: Cache Packages
|
||||||
|
id: cache-packages
|
||||||
|
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.0.2
|
||||||
|
with:
|
||||||
|
path: ./packages/
|
||||||
|
key: pkg-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}-${{ github.sha }}
|
15
.github/actions/cache-store/action.yml
vendored
Normal file
15
.github/actions/cache-store/action.yml
vendored
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
name: 'Cache build'
|
||||||
|
description: 'get or set cache build'
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: composite
|
||||||
|
steps:
|
||||||
|
- name: Cache .pnpm-store
|
||||||
|
id: cache-npm
|
||||||
|
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.0.2
|
||||||
|
with:
|
||||||
|
path: ~/.pnpm-store
|
||||||
|
key: pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ github.event.pull_request.number }}-${{ runner.os }}
|
||||||
|
restore-keys: |
|
||||||
|
pnpm-
|
||||||
|
|
50
.github/actions/install-app-node/action.yml
vendored
Normal file
50
.github/actions/install-app-node/action.yml
vendored
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
name: 'Install app with Node specific version'
|
||||||
|
description: 'install application'
|
||||||
|
|
||||||
|
inputs:
|
||||||
|
registry-url:
|
||||||
|
description: 'Registry URL for pnpm'
|
||||||
|
required: false
|
||||||
|
default: 'http://localhost:4873'
|
||||||
|
reporter:
|
||||||
|
description: 'Reporter for pnpm'
|
||||||
|
required: false
|
||||||
|
default: 'silent'
|
||||||
|
loglevel:
|
||||||
|
description: 'Log level for pnpm'
|
||||||
|
required: false
|
||||||
|
default: 'error'
|
||||||
|
node-version:
|
||||||
|
description: 'Node.js version to use'
|
||||||
|
required: true
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: composite
|
||||||
|
steps:
|
||||||
|
- name: Use Node
|
||||||
|
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||||
|
with:
|
||||||
|
node-version: ${{ inputs.node-version }}
|
||||||
|
- name: Install pnpm
|
||||||
|
run: |
|
||||||
|
corepack enable
|
||||||
|
corepack prepare
|
||||||
|
shell: bash
|
||||||
|
- name: set store
|
||||||
|
run: |
|
||||||
|
if [ ! -d "$HOME/.pnpm-store" ]; then
|
||||||
|
mkdir -p $HOME/.pnpm-store
|
||||||
|
pnpm config set store-dir $HOME/.pnpm-store
|
||||||
|
else
|
||||||
|
echo "Store directory already exists. Skipping configuration."
|
||||||
|
fi
|
||||||
|
shell: bash
|
||||||
|
- name: Restore cache pnpm store
|
||||||
|
uses: ./.github/actions/cache-store
|
||||||
|
- name: Install
|
||||||
|
run: pnpm install --reporter=${{inputs.reporter}} --ignore-scripts --registry ${{ inputs.registry-url }} --loglevel=${{ inputs.loglevel }}
|
||||||
|
shell: bash
|
||||||
|
- name: Save cache pnpm store
|
||||||
|
if: steps.cache-npm.outputs.cache-hit == 'false'
|
||||||
|
uses: ./.github/actions/cache-store
|
||||||
|
|
39
.github/actions/install-app/action.yml
vendored
Normal file
39
.github/actions/install-app/action.yml
vendored
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
name: 'Install app'
|
||||||
|
description: 'install application'
|
||||||
|
|
||||||
|
inputs:
|
||||||
|
registry-url:
|
||||||
|
description: 'Registry URL for pnpm'
|
||||||
|
required: false
|
||||||
|
default: 'http://localhost:4873'
|
||||||
|
reporter:
|
||||||
|
description: 'Reporter for pnpm'
|
||||||
|
required: false
|
||||||
|
default: 'silent'
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: composite
|
||||||
|
steps:
|
||||||
|
- name: Use Node
|
||||||
|
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||||
|
with:
|
||||||
|
node-version-file: '.nvmrc'
|
||||||
|
- name: Install pnpm
|
||||||
|
run: |
|
||||||
|
corepack enable
|
||||||
|
corepack prepare
|
||||||
|
shell: bash
|
||||||
|
- name: set store
|
||||||
|
run: |
|
||||||
|
mkdir ~/.pnpm-store
|
||||||
|
pnpm config set store-dir ~/.pnpm-store
|
||||||
|
shell: bash
|
||||||
|
- name: Restore cache pnpm store
|
||||||
|
uses: ./.github/actions/cache-store
|
||||||
|
- name: Install
|
||||||
|
run: pnpm install --reporter=${{inputs.reporter}} --ignore-scripts --registry ${{ inputs.registry-url }}
|
||||||
|
shell: bash
|
||||||
|
- name: Save cache pnpm store
|
||||||
|
if: steps.cache-npm.outputs.cache-hit == 'false'
|
||||||
|
uses: ./.github/actions/cache-store
|
||||||
|
|
87
.github/workflows/ci.yml
vendored
87
.github/workflows/ci.yml
vendored
|
@ -16,7 +16,7 @@ permissions:
|
||||||
contents: read
|
contents: read
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ci-${{ github.ref }}
|
group: ci-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
prepare:
|
prepare:
|
||||||
|
@ -29,52 +29,25 @@ jobs:
|
||||||
- 4873:4873
|
- 4873:4873
|
||||||
env:
|
env:
|
||||||
NODE_ENV: production
|
NODE_ENV: production
|
||||||
|
options: >-
|
||||||
|
--health-cmd="curl -f http://0.0.0.0:4873/-/ping || exit 1"
|
||||||
|
--health-interval=10s
|
||||||
|
--health-timeout=20s
|
||||||
|
--health-retries=6
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Node
|
- name: Install dependencies with a custom registry
|
||||||
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
uses: ./.github/actions/install-app
|
||||||
with:
|
|
||||||
node-version-file: '.nvmrc'
|
|
||||||
- name: Install pnpm
|
|
||||||
run: |
|
|
||||||
corepack enable
|
|
||||||
corepack install
|
|
||||||
- name: set store
|
|
||||||
run: |
|
|
||||||
mkdir ~/.pnpm-store
|
|
||||||
pnpm config set store-dir ~/.pnpm-store
|
|
||||||
- name: Install
|
|
||||||
run: pnpm install --registry http://localhost:4873
|
|
||||||
- name: Cache .pnpm-store
|
|
||||||
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.0.2
|
|
||||||
with:
|
|
||||||
path: ~/.pnpm-store
|
|
||||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
|
||||||
restore-keys: |
|
|
||||||
pnpm-
|
|
||||||
lint:
|
lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: Lint
|
name: Lint
|
||||||
needs: prepare
|
needs: prepare
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Node
|
- name: Install dependencies with a custom registry
|
||||||
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
uses: ./.github/actions/install-app
|
||||||
with:
|
with:
|
||||||
node-version-file: '.nvmrc'
|
reporter: 'default'
|
||||||
- name: Install pnpm
|
|
||||||
run: |
|
|
||||||
corepack enable
|
|
||||||
corepack install
|
|
||||||
- uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.0.2
|
|
||||||
with:
|
|
||||||
path: ~/.pnpm-store
|
|
||||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
|
||||||
- name: set store
|
|
||||||
run: |
|
|
||||||
pnpm config set store-dir ~/.pnpm-store
|
|
||||||
- name: Install
|
|
||||||
run: pnpm install --ignore-scripts
|
|
||||||
- name: Lint
|
- name: Lint
|
||||||
run: pnpm lint
|
run: pnpm lint
|
||||||
format:
|
format:
|
||||||
|
@ -83,23 +56,10 @@ jobs:
|
||||||
needs: prepare
|
needs: prepare
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Use Node
|
- name: Install dependencies with a custom registry
|
||||||
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
uses: ./.github/actions/install-app
|
||||||
with:
|
with:
|
||||||
node-version-file: '.nvmrc'
|
reporter: 'default'
|
||||||
- name: Install pnpm
|
|
||||||
run: |
|
|
||||||
corepack enable
|
|
||||||
corepack install
|
|
||||||
- uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.0.2
|
|
||||||
with:
|
|
||||||
path: ~/.pnpm-store
|
|
||||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
|
||||||
- name: set store
|
|
||||||
run: |
|
|
||||||
pnpm config set store-dir ~/.pnpm-store
|
|
||||||
- name: Install
|
|
||||||
run: pnpm install --ignore-scripts
|
|
||||||
- name: Lint
|
- name: Lint
|
||||||
run: pnpm format:check
|
run: pnpm format:check
|
||||||
test:
|
test:
|
||||||
|
@ -113,25 +73,10 @@ jobs:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Use Node ${{ matrix.node_version }}
|
- name: Build application with Node ${{ matrix.node_version }}
|
||||||
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
uses: ./.github/actions/build-app
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node_version }}
|
node-version: ${{ matrix.node_version }}
|
||||||
- name: Install pnpm
|
|
||||||
run: |
|
|
||||||
corepack enable
|
|
||||||
corepack prepare
|
|
||||||
- uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.0.2
|
|
||||||
with:
|
|
||||||
path: ~/.pnpm-store
|
|
||||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
|
||||||
- name: set store
|
|
||||||
run: |
|
|
||||||
pnpm config set store-dir ~/.pnpm-store
|
|
||||||
- name: Install
|
|
||||||
run: pnpm install --ignore-scripts --registry http://localhost:4873
|
|
||||||
- name: build
|
|
||||||
run: pnpm build
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: pnpm test
|
run: pnpm test
|
||||||
sync-translations:
|
sync-translations:
|
||||||
|
|
162
.github/workflows/e2e-ci.yml
vendored
162
.github/workflows/e2e-ci.yml
vendored
|
@ -19,67 +19,19 @@ jobs:
|
||||||
NODE_ENV: production
|
NODE_ENV: production
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Use Node
|
- name: Install dependencies with a custom registry
|
||||||
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
uses: ./.github/actions/install-app
|
||||||
with:
|
|
||||||
node-version-file: '.nvmrc'
|
|
||||||
- name: Install pnpm
|
|
||||||
run: |
|
|
||||||
corepack enable
|
|
||||||
corepack prepare
|
|
||||||
- name: set store
|
|
||||||
run: |
|
|
||||||
mkdir ~/.pnpm-store
|
|
||||||
pnpm config set store-dir ~/.pnpm-store
|
|
||||||
- name: Install
|
|
||||||
run: pnpm install --reporter=silence --ignore-scripts --registry http://localhost:4873
|
|
||||||
- name: Cache .pnpm-store
|
|
||||||
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.0.2
|
|
||||||
with:
|
|
||||||
path: ~/.pnpm-store
|
|
||||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}-${{ github.sha }}
|
|
||||||
restore-keys: |
|
|
||||||
pnpm-
|
|
||||||
build:
|
build:
|
||||||
needs: [prepare]
|
needs: [prepare]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Use Node
|
- name: Build application with Node ${{ matrix.node_version }}
|
||||||
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
uses: ./.github/actions/build-app
|
||||||
with:
|
with:
|
||||||
node-version-file: '.nvmrc'
|
node-version: ${{ matrix.node_version }}
|
||||||
- name: Install pnpm
|
|
||||||
run: |
|
|
||||||
corepack enable
|
|
||||||
corepack prepare
|
|
||||||
- uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.0.2
|
|
||||||
with:
|
|
||||||
path: ~/.pnpm-store
|
|
||||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}-${{ github.sha }}
|
|
||||||
- name: set store
|
|
||||||
run: |
|
|
||||||
pnpm config set store-dir ~/.pnpm-store
|
|
||||||
- name: Install
|
|
||||||
run: pnpm recursive install --reporter=silence --registry http://localhost:4873
|
|
||||||
- name: build
|
|
||||||
run: pnpm build
|
|
||||||
- name: Cache packages
|
- name: Cache packages
|
||||||
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.0.2
|
uses: ./.github/actions/cache-packages
|
||||||
id: cache-packages
|
|
||||||
with:
|
|
||||||
path: ./packages/
|
|
||||||
key: pkg-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}-${{ github.sha }}
|
|
||||||
restore-keys: |
|
|
||||||
packages-
|
|
||||||
# - name: Cache test
|
|
||||||
# uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # tag=v3
|
|
||||||
# id: cache-test
|
|
||||||
# with:
|
|
||||||
# path: ./e2e/
|
|
||||||
# key: test-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}-${{ github.sha }}
|
|
||||||
# restore-keys: |
|
|
||||||
# test-
|
|
||||||
e2e-cli-npm:
|
e2e-cli-npm:
|
||||||
needs: [prepare, build]
|
needs: [prepare, build]
|
||||||
strategy:
|
strategy:
|
||||||
|
@ -93,37 +45,19 @@ jobs:
|
||||||
npm9,
|
npm9,
|
||||||
npm10
|
npm10
|
||||||
]
|
]
|
||||||
node: [20, 22]
|
node: [18, 23]
|
||||||
name: ${{ matrix.pkg }}/ ubuntu-latest / ${{ matrix.node }}
|
name: ${{ matrix.pkg }}/ ubuntu-latest / ${{ matrix.node }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
- name: Install dependencies with a custom registry version ${{ inputs.node-version }}
|
||||||
|
uses: ./.github/actions/install-app-node
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node }}
|
node-version: ${{ inputs.node_version }}
|
||||||
- name: Install pnpm
|
reporter: 'default'
|
||||||
run: |
|
loglevel: 'debug'
|
||||||
corepack enable
|
- name: Restore cache pnpm store
|
||||||
corepack prepare
|
uses: ./.github/actions/cache-packages
|
||||||
- uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.0.2
|
|
||||||
with:
|
|
||||||
path: ~/.pnpm-store
|
|
||||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}-${{ github.sha }}
|
|
||||||
- name: set store
|
|
||||||
run: |
|
|
||||||
pnpm config set store-dir ~/.pnpm-store
|
|
||||||
- name: Install
|
|
||||||
run: pnpm install --offline --reporter=silence --ignore-scripts --registry http://localhost:4873
|
|
||||||
- uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.0.2
|
|
||||||
with:
|
|
||||||
path: ./packages/
|
|
||||||
key: pkg-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}-${{ github.sha }}
|
|
||||||
# - uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # tag=v3
|
|
||||||
# with:
|
|
||||||
# path: ./e2e/
|
|
||||||
# key: test-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}-${{ github.sha }}
|
|
||||||
- name: build e2e
|
|
||||||
run: pnpm --filter @verdaccio/test-cli-commons build
|
|
||||||
- name: Test CLI
|
- name: Test CLI
|
||||||
run: NODE_ENV=production pnpm test --filter ...@verdaccio/e2e-cli-${{matrix.pkg}}
|
run: NODE_ENV=production pnpm test --filter ...@verdaccio/e2e-cli-${{matrix.pkg}}
|
||||||
|
|
||||||
|
@ -138,37 +72,19 @@ jobs:
|
||||||
pnpm9,
|
pnpm9,
|
||||||
pnpm10,
|
pnpm10,
|
||||||
]
|
]
|
||||||
node: [20, 22]
|
node: [18, 23]
|
||||||
name: ${{ matrix.pkg }}/ ubuntu-latest / ${{ matrix.node }}
|
name: ${{ matrix.pkg }}/ ubuntu-latest / ${{ matrix.node }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
- name: Install dependencies with a custom registry version ${{ inputs.node-version }}
|
||||||
|
uses: ./.github/actions/install-app-node
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node }}
|
node-version: ${{ inputs.node_version }}
|
||||||
- name: Install pnpm
|
reporter: 'default'
|
||||||
run: |
|
loglevel: 'debug'
|
||||||
corepack enable
|
- name: Restore cache pnpm store
|
||||||
corepack prepare
|
uses: ./.github/actions/cache-packages
|
||||||
- uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.0.2
|
|
||||||
with:
|
|
||||||
path: ~/.pnpm-store
|
|
||||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}-${{ github.sha }}
|
|
||||||
- name: set store
|
|
||||||
run: |
|
|
||||||
pnpm config set store-dir ~/.pnpm-store
|
|
||||||
- name: Install
|
|
||||||
run: pnpm install --loglevel debug --ignore-scripts --registry http://localhost:4873
|
|
||||||
- uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.0.2
|
|
||||||
with:
|
|
||||||
path: ./packages/
|
|
||||||
key: pkg-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}-${{ github.sha }}
|
|
||||||
# - uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # tag=v3
|
|
||||||
# with:
|
|
||||||
# path: ./e2e/
|
|
||||||
# key: test-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}-${{ github.sha }}
|
|
||||||
- name: build e2e
|
|
||||||
run: pnpm --filter @verdaccio/test-cli-commons build
|
|
||||||
- name: Test CLI
|
- name: Test CLI
|
||||||
run: NODE_ENV=production pnpm test --filter ...@verdaccio/e2e-cli-${{matrix.pkg}}
|
run: NODE_ENV=production pnpm test --filter ...@verdaccio/e2e-cli-${{matrix.pkg}}
|
||||||
e2e-cli-yarn:
|
e2e-cli-yarn:
|
||||||
|
@ -183,37 +99,19 @@ jobs:
|
||||||
yarn3,
|
yarn3,
|
||||||
yarn4
|
yarn4
|
||||||
]
|
]
|
||||||
node: [20, 22]
|
node: [18, 23]
|
||||||
name: ${{ matrix.pkg }}/ ubuntu-latest / ${{ matrix.node }}
|
name: ${{ matrix.pkg }}/ ubuntu-latest / ${{ matrix.node }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
- name: Install dependencies with a custom registry version ${{ inputs.node-version }}
|
||||||
|
uses: ./.github/actions/install-app-node
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node }}
|
node-version: ${{ inputs.node_version }}
|
||||||
- name: Install pnpm
|
reporter: 'default'
|
||||||
run: |
|
loglevel: 'debug'
|
||||||
corepack enable
|
- name: Restore cache pnpm store
|
||||||
corepack prepare
|
uses: ./.github/actions/cache-packages
|
||||||
- uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.0.2
|
|
||||||
with:
|
|
||||||
path: ~/.pnpm-store
|
|
||||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}-${{ github.sha }}
|
|
||||||
- name: set store
|
|
||||||
run: |
|
|
||||||
pnpm config set store-dir ~/.pnpm-store
|
|
||||||
- name: Install
|
|
||||||
run: pnpm install --offline --reporter=silence --ignore-scripts --registry http://localhost:4873
|
|
||||||
- uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.0.2
|
|
||||||
with:
|
|
||||||
path: ./packages/
|
|
||||||
key: pkg-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}-${{ github.sha }}
|
|
||||||
# - uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # tag=v3
|
|
||||||
# with:
|
|
||||||
# path: ./e2e/
|
|
||||||
# key: test-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}-${{ github.sha }}
|
|
||||||
- name: build e2e
|
|
||||||
run: pnpm --filter @verdaccio/test-cli-commons build
|
|
||||||
- name: Test CLI
|
- name: Test CLI
|
||||||
run: NODE_ENV=production pnpm test --filter ...@verdaccio/e2e-cli-${{matrix.pkg}}
|
run: NODE_ENV=production pnpm test --filter ...@verdaccio/e2e-cli-${{matrix.pkg}}
|
||||||
|
|
||||||
|
|
17
.github/workflows/e2e-ui.yml
vendored
17
.github/workflows/e2e-ui.yml
vendored
|
@ -1,11 +1,12 @@
|
||||||
name: E2E UI
|
name: E2E UI
|
||||||
|
|
||||||
on: [pull_request]
|
on: [pull_request]
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
concurrency:
|
concurrency:
|
||||||
group: e2e-ui-${{ github.ref }}
|
group: e2e-ui-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -19,18 +20,10 @@ jobs:
|
||||||
NODE_ENV: production
|
NODE_ENV: production
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Use Node
|
- name: Build application with Node 20
|
||||||
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
uses: ./.github/actions/build-app
|
||||||
with:
|
with:
|
||||||
node-version-file: '.nvmrc'
|
node-version: 20
|
||||||
- name: Install pnpm
|
|
||||||
run: |
|
|
||||||
corepack enable
|
|
||||||
corepack prepare
|
|
||||||
- name: Install
|
|
||||||
run: pnpm install --reporter=silence --registry http://localhost:4873
|
|
||||||
- name: build
|
|
||||||
run: pnpm build
|
|
||||||
- name: Test UI
|
- name: Test UI
|
||||||
run: pnpm test:e2e:ui
|
run: pnpm test:e2e:ui
|
||||||
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
|
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
|
||||||
|
|
24
.github/workflows/plugin-generator-e2e.yaml
vendored
24
.github/workflows/plugin-generator-e2e.yaml
vendored
|
@ -9,32 +9,20 @@ on:
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: generator-plugin-${{ github.ref }}
|
group: generator-plugin-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
e2e-plugin-generator:
|
e2e-plugin-generator:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
node-version: [18,20, 21]
|
node-version: [20, 22, 23]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
- name: Build application with Node ${{ matrix.node_version }}
|
||||||
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
uses: ./.github/actions/build-app
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: ${{ matrix.node_version }}
|
||||||
- name: Install pnpm
|
|
||||||
run: |
|
|
||||||
corepack enable
|
|
||||||
corepack install
|
|
||||||
- uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.0.2
|
|
||||||
with:
|
|
||||||
path: ~/.pnpm-store
|
|
||||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
|
||||||
- name: install
|
|
||||||
run: pnpm install
|
|
||||||
- name: build
|
|
||||||
run: pnpm build
|
|
||||||
- name: install verdaccio
|
- name: install verdaccio
|
||||||
run: npm install -g verdaccio@5
|
run: npm install -g verdaccio@5
|
||||||
- name: Start server
|
- name: Start server
|
||||||
|
@ -49,4 +37,4 @@ jobs:
|
||||||
run: npm install -g yo@4 --loglevel=info
|
run: npm install -g yo@4 --loglevel=info
|
||||||
- name: install generator
|
- name: install generator
|
||||||
run: npm install -g generator-verdaccio-plugin --loglevel=info --registry http://localhost:4873
|
run: npm install -g generator-verdaccio-plugin --loglevel=info --registry http://localhost:4873
|
||||||
# Future: add a test to verify the plugin is working with prompt
|
# Future: add a test to verify the plugin is working with prompt
|
||||||
|
|
12
.github/workflows/static-data.yml
vendored
12
.github/workflows/static-data.yml
vendored
|
@ -3,6 +3,7 @@ name: static data
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
# pull_request:
|
||||||
schedule:
|
schedule:
|
||||||
# twice peer week
|
# twice peer week
|
||||||
- cron: '0 0 * * 1,4'
|
- cron: '0 0 * * 1,4'
|
||||||
|
@ -24,13 +25,10 @@ jobs:
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
- name: Install dependencies with a custom registry
|
||||||
|
uses: ./.github/actions/install-app
|
||||||
with:
|
with:
|
||||||
node-version: 18.x
|
reporter: 'default'
|
||||||
- name: install pnpm
|
|
||||||
run: sudo npm i pnpm@latest-8 -g
|
|
||||||
- name: install dependencies
|
|
||||||
run: pnpm install
|
|
||||||
- name: Build Translations percentage
|
- name: Build Translations percentage
|
||||||
run: pnpm --filter @verdaccio/crowdin-translations build
|
run: pnpm --filter @verdaccio/crowdin-translations build
|
||||||
- name: update contributors
|
- name: update contributors
|
||||||
|
@ -42,7 +40,7 @@ jobs:
|
||||||
- name: update translations
|
- name: update translations
|
||||||
run: pnpm run translations
|
run: pnpm run translations
|
||||||
env:
|
env:
|
||||||
TOKEN: ${{ secrets.CROWDIN_VERDACCIO_API_KEY }}
|
TOKEN: ${{ secrets.CROWDIN_VERDACCIO_API_KEY }}
|
||||||
- name: format
|
- name: format
|
||||||
run: pnpm format
|
run: pnpm format
|
||||||
- name: Commit & Push changes
|
- name: Commit & Push changes
|
||||||
|
|
25
.github/workflows/ui-components.yml
vendored
25
.github/workflows/ui-components.yml
vendored
|
@ -1,9 +1,10 @@
|
||||||
name: UI Components
|
name: UI Components
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
# pull_request:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
schedule:
|
# schedule:
|
||||||
- cron: '0 0 * * *'
|
# - cron: '0 0 * * *'
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read # to fetch code (actions/checkout)
|
contents: read # to fetch code (actions/checkout)
|
||||||
|
@ -25,27 +26,15 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
|
|
||||||
- name: Use Node
|
- name: Install dependencies with a custom registry
|
||||||
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
uses: ./.github/actions/install-app
|
||||||
with:
|
|
||||||
node-version-file: '.nvmrc'
|
|
||||||
|
|
||||||
- name: Cache pnpm modules
|
|
||||||
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.0.2
|
|
||||||
env:
|
|
||||||
cache-name: cache-pnpm-modules
|
|
||||||
with:
|
|
||||||
path: ~/.pnpm-store
|
|
||||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-
|
|
||||||
|
|
||||||
- name: Install pnpm
|
- name: Install pnpm
|
||||||
run: |
|
run: |
|
||||||
corepack enable
|
corepack enable
|
||||||
corepack prepare --activate pnpm@8.9.0
|
corepack prepare
|
||||||
- name: Install
|
- name: Install
|
||||||
run: pnpm install
|
run: pnpm install
|
||||||
- name: Build storybook
|
- name: Build storybook
|
||||||
run: pnpm ui:storybook:build
|
run: pnpm ui:storybook:build
|
||||||
- name: Copy public content
|
- name: Copy public content
|
||||||
|
|
27
.github/workflows/website.yml
vendored
27
.github/workflows/website.yml
vendored
|
@ -2,7 +2,6 @@ name: Verdaccio Website CI
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read # to fetch code (actions/checkout)
|
contents: read # to fetch code (actions/checkout)
|
||||||
|
|
||||||
|
@ -31,30 +30,10 @@ jobs:
|
||||||
NODE_OPTIONS: --max_old_space_size=4096
|
NODE_OPTIONS: --max_old_space_size=4096
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
|
- name: Build application with Node 20
|
||||||
- name: Node
|
uses: ./.github/actions/build-app
|
||||||
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
|
||||||
with:
|
with:
|
||||||
node-version-file: '.nvmrc'
|
node-version: 20
|
||||||
- name: Install pnpm
|
|
||||||
run: |
|
|
||||||
corepack enable
|
|
||||||
corepack install
|
|
||||||
- name: set store
|
|
||||||
run: |
|
|
||||||
mkdir ~/.pnpm-store
|
|
||||||
pnpm config set store-dir ~/.pnpm-store
|
|
||||||
- name: Install
|
|
||||||
run: pnpm install --registry http://localhost:4873
|
|
||||||
- name: Cache .pnpm-store
|
|
||||||
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.0.2
|
|
||||||
with:
|
|
||||||
path: ~/.pnpm-store
|
|
||||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
|
||||||
restore-keys: |
|
|
||||||
pnpm-
|
|
||||||
- name: Build
|
|
||||||
run: pnpm build
|
|
||||||
- name: Build Translations percentage
|
- name: Build Translations percentage
|
||||||
run: pnpm --filter @verdaccio/crowdin-translations build
|
run: pnpm --filter @verdaccio/crowdin-translations build
|
||||||
- name: Cache Docusaurus Build
|
- name: Cache Docusaurus Build
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"cypress:open": "cypress open",
|
"cypress:open": "cypress open",
|
||||||
"test": "cypress run"
|
"cypress:install": "cypress install",
|
||||||
|
"test": "cypress install && cypress run"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue