Skip to content

E2E CLI

E2E CLI #1604

Workflow file for this run

name: E2E CLI
on:
workflow_dispatch:
pull_request:
push:
schedule:
# run every sunday
- cron: '0 0 * * 0'
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
- name: Use Node
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3
with:
node-version-file: '.nvmrc'
- name: corepack
run: corepack enable
- name: pnpm enable
run: corepack prepare pnpm@latest-8 --activate
- name: set store
run: |
mkdir ~/.pnpm-store
pnpm config set store-dir ~/.pnpm-store
- name: Set up .npmrc
run: |
echo "//rg.verdaccio.org/:_authToken=${{ secrets.VERDACCIO_TOKEN }}" > .npmrc
- name: registry
run: npm config set registry https://rg.verdaccio.org
- name: Install
run: pnpm install
- name: Cache .pnpm-store
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
with:
path: ~/.pnpm-store
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}-${{ github.sha }}
restore-keys: |
pnpm-
- name: build
run: pnpm build
- name: Cache tools
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
id: cache-tools
with:
path: ./tools/
key: pkg-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}-${{ github.sha }}
restore-keys: |
tools-
e2e-cli:
needs: [build]
strategy:
fail-fast: false
matrix:
pkg: [npm6, npm7, npm8, npm9, npm10, pnpm7, pnpm9, yarn1, yarn2, yarn3, yarn4]
node: [18]
name: ${{ matrix.pkg }}/ ubuntu-latest / ${{ matrix.node }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
- uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3
with:
node-version: ${{ matrix.node }}
- name: corepack
run: corepack enable
- name: pnpm enable
run: corepack prepare pnpm@latest-8 --activate
- uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
with:
path: ~/.pnpm-store
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}-${{ github.sha }}
- name: Set up .npmrc
run: |
echo "//rg.verdaccio.org/:_authToken=${{ secrets.VERDACCIO_TOKEN }}" > .npmrc
- name: registry
run: npm config set registry https://rg.verdaccio.org
- name: Install
run: pnpm install --frozen-lockfile
- uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
with:
path: ./tools/
key: pkg-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}-${{ github.sha }}
- name: Test CLI
run: NODE_ENV=production pnpm test --filter ...@verdaccio/e2e-cli-${{matrix.pkg}}