2022-09-18 14:47:23 -05:00
|
|
|
name: E2E CLI
|
|
|
|
|
2022-09-24 04:30:16 -05:00
|
|
|
on: [pull_request]
|
2022-09-18 14:47:23 -05:00
|
|
|
permissions:
|
|
|
|
contents: read
|
2024-02-18 05:33:07 -05:00
|
|
|
concurrency:
|
2024-02-18 15:08:17 -05:00
|
|
|
group: e2e-ci-${{ github.ref }}
|
2024-02-18 05:33:07 -05:00
|
|
|
cancel-in-progress: true
|
2022-09-18 14:47:23 -05:00
|
|
|
jobs:
|
|
|
|
prepare:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
name: setup e2e verdaccio
|
|
|
|
services:
|
|
|
|
verdaccio:
|
2023-04-17 00:49:45 -05:00
|
|
|
image: verdaccio/verdaccio:nightly-master
|
2022-09-18 14:47:23 -05:00
|
|
|
ports:
|
|
|
|
- 4873:4873
|
|
|
|
env:
|
|
|
|
NODE_ENV: production
|
|
|
|
steps:
|
2024-07-07 10:25:53 -05:00
|
|
|
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v3
|
2023-10-23 14:49:18 -05:00
|
|
|
- name: Use Node
|
2024-08-01 11:50:33 -05:00
|
|
|
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v3
|
2023-10-23 14:49:18 -05:00
|
|
|
with:
|
|
|
|
node-version-file: '.nvmrc'
|
|
|
|
- name: Install pnpm
|
|
|
|
run: |
|
|
|
|
corepack enable
|
2023-12-31 08:34:29 -05:00
|
|
|
corepack prepare
|
2023-10-23 14:49:18 -05:00
|
|
|
- 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
|
2024-07-07 10:26:03 -05:00
|
|
|
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v3
|
2023-10-23 14:49:18 -05:00
|
|
|
with:
|
|
|
|
path: ~/.pnpm-store
|
|
|
|
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}-${{ github.sha }}
|
|
|
|
restore-keys: |
|
|
|
|
pnpm-
|
2022-09-18 14:47:23 -05:00
|
|
|
build:
|
|
|
|
needs: [prepare]
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-07-07 10:25:53 -05:00
|
|
|
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v3
|
2022-09-18 14:47:23 -05:00
|
|
|
- name: Use Node 16
|
2024-08-01 11:50:33 -05:00
|
|
|
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v3
|
2022-09-18 14:47:23 -05:00
|
|
|
with:
|
2022-09-19 16:10:38 -05:00
|
|
|
node-version-file: '.nvmrc'
|
2022-09-18 14:47:23 -05:00
|
|
|
- name: Install pnpm
|
2023-10-23 14:49:18 -05:00
|
|
|
run: |
|
|
|
|
corepack enable
|
2023-12-31 08:34:29 -05:00
|
|
|
corepack prepare
|
2024-07-07 10:26:03 -05:00
|
|
|
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v3
|
2022-09-18 14:47:23 -05:00
|
|
|
with:
|
|
|
|
path: ~/.pnpm-store
|
2022-09-27 15:56:17 -05:00
|
|
|
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}-${{ github.sha }}
|
2023-04-12 01:23:01 -05:00
|
|
|
- name: set store
|
|
|
|
run: |
|
2023-10-23 14:49:18 -05:00
|
|
|
pnpm config set store-dir ~/.pnpm-store
|
2022-09-18 14:47:23 -05:00
|
|
|
- name: Install
|
2023-04-12 01:23:01 -05:00
|
|
|
run: pnpm recursive install --reporter=silence --registry http://localhost:4873
|
2022-09-18 14:47:23 -05:00
|
|
|
- name: build
|
|
|
|
run: pnpm build
|
|
|
|
- name: Cache packages
|
2024-07-07 10:26:03 -05:00
|
|
|
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v3
|
2022-09-18 14:47:23 -05:00
|
|
|
id: cache-packages
|
|
|
|
with:
|
|
|
|
path: ./packages/
|
2022-09-27 15:56:17 -05:00
|
|
|
key: pkg-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}-${{ github.sha }}
|
2022-09-18 14:47:23 -05:00
|
|
|
restore-keys: |
|
|
|
|
packages-
|
2022-09-27 15:56:17 -05:00
|
|
|
# - name: Cache test
|
2022-10-18 14:35:30 -05:00
|
|
|
# uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # tag=v3
|
2022-09-27 15:56:17 -05:00
|
|
|
# id: cache-test
|
|
|
|
# with:
|
|
|
|
# path: ./e2e/
|
|
|
|
# key: test-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}-${{ github.sha }}
|
|
|
|
# restore-keys: |
|
|
|
|
# test-
|
2023-12-31 08:34:29 -05:00
|
|
|
e2e-cli-npm:
|
2022-09-18 14:47:23 -05:00
|
|
|
needs: [prepare, build]
|
|
|
|
strategy:
|
2024-02-18 05:33:07 -05:00
|
|
|
fail-fast: false
|
2022-09-18 14:47:23 -05:00
|
|
|
matrix:
|
2023-10-23 14:49:18 -05:00
|
|
|
pkg:
|
|
|
|
[
|
|
|
|
npm6,
|
|
|
|
npm7,
|
|
|
|
npm8,
|
|
|
|
npm9,
|
2023-12-31 08:34:29 -05:00
|
|
|
npm10
|
|
|
|
]
|
|
|
|
node: [20, 21]
|
|
|
|
name: ${{ matrix.pkg }}/ ubuntu-latest / ${{ matrix.node }}
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-07-07 10:25:53 -05:00
|
|
|
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v3
|
2024-08-01 11:50:33 -05:00
|
|
|
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v3
|
2023-12-31 08:34:29 -05:00
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node }}
|
|
|
|
- name: Install pnpm
|
|
|
|
run: |
|
|
|
|
corepack enable
|
|
|
|
corepack prepare
|
2024-07-07 10:26:03 -05:00
|
|
|
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v3
|
2023-12-31 08:34:29 -05:00
|
|
|
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
|
2024-07-07 10:26:03 -05:00
|
|
|
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v3
|
2023-12-31 08:34:29 -05:00
|
|
|
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
|
|
|
|
run: NODE_ENV=production pnpm test --filter ...@verdaccio/e2e-cli-${{matrix.pkg}}
|
2024-03-23 05:32:13 -05:00
|
|
|
|
|
|
|
e2e-cli-pnpm:
|
|
|
|
needs: [prepare, build]
|
|
|
|
strategy:
|
|
|
|
fail-fast: true
|
|
|
|
matrix:
|
|
|
|
pkg:
|
|
|
|
[
|
|
|
|
pnpm8,
|
|
|
|
pnpm9,
|
|
|
|
]
|
|
|
|
node: [20, 21]
|
|
|
|
name: ${{ matrix.pkg }}/ ubuntu-latest / ${{ matrix.node }}
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-07-07 10:25:53 -05:00
|
|
|
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v3
|
2024-08-01 11:50:33 -05:00
|
|
|
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v3
|
2024-03-23 05:32:13 -05:00
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node }}
|
|
|
|
- name: Install pnpm
|
|
|
|
run: |
|
|
|
|
corepack enable
|
|
|
|
corepack prepare
|
2024-07-07 10:26:03 -05:00
|
|
|
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v3
|
2024-03-23 05:32:13 -05:00
|
|
|
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
|
2024-07-07 10:26:03 -05:00
|
|
|
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v3
|
2024-03-23 05:32:13 -05:00
|
|
|
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
|
|
|
|
run: NODE_ENV=production pnpm test --filter ...@verdaccio/e2e-cli-${{matrix.pkg}}
|
2023-12-31 08:34:29 -05:00
|
|
|
e2e-cli-yarn:
|
|
|
|
needs: [prepare, build]
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
pkg:
|
|
|
|
[
|
2023-10-23 14:49:18 -05:00
|
|
|
yarn1,
|
|
|
|
yarn2,
|
|
|
|
yarn3,
|
2023-12-31 08:34:29 -05:00
|
|
|
yarn4
|
2023-10-23 14:49:18 -05:00
|
|
|
]
|
2023-12-31 08:34:29 -05:00
|
|
|
node: [20, 21]
|
2023-01-29 09:08:50 -05:00
|
|
|
name: ${{ matrix.pkg }}/ ubuntu-latest / ${{ matrix.node }}
|
2022-09-18 14:47:23 -05:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-07-07 10:25:53 -05:00
|
|
|
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v3
|
2024-08-01 11:50:33 -05:00
|
|
|
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v3
|
2022-09-18 14:47:23 -05:00
|
|
|
with:
|
2023-01-29 09:08:50 -05:00
|
|
|
node-version: ${{ matrix.node }}
|
2022-09-18 14:47:23 -05:00
|
|
|
- name: Install pnpm
|
2023-10-23 14:49:18 -05:00
|
|
|
run: |
|
|
|
|
corepack enable
|
2023-12-31 08:34:29 -05:00
|
|
|
corepack prepare
|
2024-07-07 10:26:03 -05:00
|
|
|
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v3
|
2022-09-18 14:47:23 -05:00
|
|
|
with:
|
|
|
|
path: ~/.pnpm-store
|
2022-09-27 15:56:17 -05:00
|
|
|
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}-${{ github.sha }}
|
2023-04-12 01:23:01 -05:00
|
|
|
- name: set store
|
|
|
|
run: |
|
2023-10-23 14:49:18 -05:00
|
|
|
pnpm config set store-dir ~/.pnpm-store
|
2022-09-18 14:47:23 -05:00
|
|
|
- name: Install
|
2023-04-12 01:23:01 -05:00
|
|
|
run: pnpm install --offline --reporter=silence --ignore-scripts --registry http://localhost:4873
|
2024-07-07 10:26:03 -05:00
|
|
|
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v3
|
2022-09-18 14:47:23 -05:00
|
|
|
with:
|
|
|
|
path: ./packages/
|
2022-09-27 15:56:17 -05:00
|
|
|
key: pkg-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}-${{ github.sha }}
|
2022-10-18 14:35:30 -05:00
|
|
|
# - uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # tag=v3
|
2022-09-27 15:56:17 -05:00
|
|
|
# with:
|
|
|
|
# path: ./e2e/
|
|
|
|
# key: test-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}-${{ github.sha }}
|
|
|
|
- name: build e2e
|
2023-10-23 14:49:18 -05:00
|
|
|
run: pnpm --filter @verdaccio/test-cli-commons build
|
2022-09-18 14:47:23 -05:00
|
|
|
- name: Test CLI
|
|
|
|
run: NODE_ENV=production pnpm test --filter ...@verdaccio/e2e-cli-${{matrix.pkg}}
|
2023-12-31 08:34:29 -05:00
|
|
|
|