0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-23 22:27:34 -05:00
verdaccio/.github/workflows/ci-windows.yml

151 lines
4.8 KiB
YAML
Raw Normal View History

2022-10-15 02:51:55 -05:00
name: CI windows
on:
workflow_dispatch:
schedule:
- cron: '5 0 * * SUN'
permissions:
contents: read
jobs:
prepare:
2022-10-15 02:54:24 -05:00
runs-on: ubuntu-latest
2022-10-15 02:51:55 -05:00
name: setup verdaccio
services:
verdaccio:
2023-04-17 00:49:45 -05:00
image: verdaccio/verdaccio:nightly-master
2022-10-15 02:51:55 -05:00
ports:
- 4873:4873
env:
NODE_ENV: production
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
2022-10-15 02:51:55 -05:00
- name: Node
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # tag=v3
2022-10-15 02:51:55 -05:00
with:
node-version-file: '.nvmrc'
- name: Install pnpm
2023-04-12 01:23:01 -05:00
run: npm i pnpm@latest-8 -g
2022-10-15 02:51:55 -05:00
- name: set store
run: |
mkdir ~/.pnpm-store
pnpm config set store-dir ~/.pnpm-store
2023-04-12 01:23:01 -05:00
- name: set store
run: |
mkdir ~/.pnpm-store
pnpm config set store-dir ~/.pnpm-store
2022-10-15 02:51:55 -05:00
- name: Install
2023-04-12 01:23:01 -05:00
run: pnpm install --registry http://localhost:4873
2022-10-15 02:51:55 -05:00
- name: Cache .pnpm-store
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
2022-10-15 02:51:55 -05:00
with:
path: ~/.pnpm-store
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
pnpm-
lint:
runs-on: windows-latest
name: Lint
needs: prepare
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
2022-10-15 02:51:55 -05:00
- name: Node
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # tag=v3
2022-10-15 02:51:55 -05:00
with:
node-version-file: '.nvmrc'
- name: Install pnpm
2023-04-12 01:23:01 -05:00
run: npm i pnpm@latest-8 -g
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
2022-10-15 02:51:55 -05:00
with:
path: ~/.pnpm-store
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
2023-04-12 01:23:01 -05:00
- name: set store
run: |
mkdir ~/.pnpm-store
pnpm config set store-dir ~/.pnpm-store
2022-10-15 02:51:55 -05:00
- name: Install
2023-04-12 01:23:01 -05:00
run: pnpm install --offline --reporter=silence --ignore-scripts
2022-10-15 02:51:55 -05:00
- name: Lint
run: pnpm lint
format:
runs-on: windows-latest
name: Format
needs: prepare
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
2022-10-15 02:51:55 -05:00
- name: Use Node
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # tag=v3
2022-10-15 02:51:55 -05:00
with:
node-version-file: '.nvmrc'
- name: Install pnpm
2023-04-12 01:23:01 -05:00
run: npm i pnpm@latest-8 -g
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
2022-10-15 02:51:55 -05:00
with:
path: ~/.pnpm-store
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
2023-04-12 01:23:01 -05:00
- name: set store
run: |
mkdir ~/.pnpm-store
pnpm config set store-dir ~/.pnpm-store
2022-10-15 02:51:55 -05:00
- name: Install
2023-04-12 01:23:01 -05:00
run: pnpm install --offline --reporter=silence --ignore-scripts
2022-10-15 02:51:55 -05:00
- name: Lint
run: pnpm format:check
build:
needs: [format, lint]
strategy:
fail-fast: true
matrix:
os: [windows-latest]
node_version: [18]
name: ${{ matrix.os }} / Node ${{ matrix.node_version }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
2022-10-15 02:51:55 -05:00
- name: Use Node ${{ matrix.node_version }}
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # tag=v3
2022-10-15 02:51:55 -05:00
with:
node-version: ${{ matrix.node_version }}
- name: Install pnpm
2023-04-12 01:23:01 -05:00
run: npm i pnpm@latest-8 -g
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
2022-10-15 02:51:55 -05:00
with:
path: ~/.pnpm-store
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
2023-04-12 01:23:01 -05:00
- name: set store
run: |
mkdir ~/.pnpm-store
pnpm config set store-dir ~/.pnpm-store
2022-10-15 02:51:55 -05:00
- name: Install
2023-04-12 01:23:01 -05:00
run: pnpm install --offline --reporter=silence --ignore-scripts --registry http://localhost:4873
2022-10-15 02:51:55 -05:00
- name: build
run: pnpm build
- name: Test
run: pnpm test
ci-e2e-ui:
needs: [format, lint]
runs-on: windows-latest
name: UI Test E2E
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
- uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # tag=v3
2022-10-15 02:51:55 -05:00
with:
node-version-file: '.nvmrc'
- name: Install pnpm
2023-04-12 01:23:01 -05:00
run: npm i pnpm@latest-8 -g
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
2022-10-15 02:51:55 -05:00
with:
path: ~/.pnpm-store
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
2023-04-12 01:23:01 -05:00
- name: set store
run: |
mkdir ~/.pnpm-store
pnpm config set store-dir ~/.pnpm-store
2022-10-15 02:51:55 -05:00
- name: Install
2023-04-12 01:23:01 -05:00
run: pnpm install --offline --reporter=silence --registry http://localhost:4873
2022-10-15 02:51:55 -05:00
- name: build
run: pnpm build
- name: Test UI
run: pnpm test:e2e:ui
# env:
# DEBUG: verdaccio:e2e*