mirror of
https://github.com/verdaccio/verdaccio.git
synced 2025-01-27 22:59:51 -05:00
enable ci node 16, 17 gh actions (#2823)
* chore: enable ci node 15 and higher * use localhost * Update ci.yml * Update ci.yml * Update ci.yml * Update ci.yml * Update ci.yml
This commit is contained in:
parent
4fd84f589b
commit
52d3442856
4 changed files with 37 additions and 63 deletions
92
.github/workflows/ci.yml
vendored
92
.github/workflows/ci.yml
vendored
|
@ -10,7 +10,7 @@ on:
|
|||
- .changeset/**
|
||||
- .github/workflows/ci.yml
|
||||
- 'packages/**'
|
||||
- 'docker-examples/**'
|
||||
- 'docker-examples/**'
|
||||
- 'jest/**'
|
||||
- 'package.json'
|
||||
- 'pnpm-workspace.yaml'
|
||||
|
@ -28,11 +28,11 @@ jobs:
|
|||
- name: Use Node 14
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 14
|
||||
node-version: 14
|
||||
- name: Install pnpm
|
||||
run: npm i pnpm@6.24.1 -g
|
||||
- name: set store
|
||||
run: |
|
||||
run: |
|
||||
mkdir ~/.pnpm-store
|
||||
pnpm config set store-dir ~/.pnpm-store
|
||||
- name: Install
|
||||
|
@ -59,7 +59,7 @@ jobs:
|
|||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
- name: Install
|
||||
run: pnpm recursive install --frozen-lockfile --ignore-scripts
|
||||
- name: Lint
|
||||
|
@ -79,15 +79,15 @@ jobs:
|
|||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
- name: Install
|
||||
run: pnpm recursive install --frozen-lockfile --ignore-scripts
|
||||
- name: Lint
|
||||
run: pnpm format:check
|
||||
|
||||
build:
|
||||
build14:
|
||||
runs-on: ubuntu-latest
|
||||
name: build
|
||||
name: build-node-14
|
||||
needs: [format, lint]
|
||||
steps:
|
||||
- uses: actions/checkout@v2.4.0
|
||||
|
@ -100,7 +100,7 @@ jobs:
|
|||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
- name: Install
|
||||
run: pnpm recursive install --frozen-lockfile --ignore-scripts
|
||||
- name: crowdin download
|
||||
|
@ -111,24 +111,24 @@ jobs:
|
|||
run: pnpm crowdin:download
|
||||
## this step is optional, translations are not mandatory for PR
|
||||
## secrets keys are not available on forks, the failure here is guaranteed
|
||||
continue-on-error: true
|
||||
continue-on-error: true
|
||||
- name: build
|
||||
run: pnpm build
|
||||
- name: tar packages
|
||||
run: |
|
||||
run: |
|
||||
tar -czvf ${{ github.workspace }}/pkg.tar.gz -C ${{ github.workspace }}/packages .
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: verdaccio-artifact
|
||||
path: pkg.tar.gz
|
||||
test:
|
||||
needs: build
|
||||
path: pkg.tar.gz
|
||||
build:
|
||||
needs: [format, lint]
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
os: [ubuntu-latest]
|
||||
os: [ubuntu-latest, windows-latest]
|
||||
## Node 16 breaks UI test, jest issue
|
||||
node_version: [14]
|
||||
node_version: [14, 16, 17]
|
||||
name: ${{ matrix.os }} / Node ${{ matrix.node_version }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
|
@ -137,23 +137,20 @@ jobs:
|
|||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node_version }}
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: verdaccio-artifact
|
||||
- name: untar packages
|
||||
run: tar -xzvf pkg.tar.gz -C ${{ github.workspace }}/packages
|
||||
- name: Install pnpm
|
||||
run: npm i pnpm@6.24.1 -g
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
- name: Install
|
||||
run: pnpm recursive install --frozen-lockfile --ignore-scripts
|
||||
run: pnpm recursive install --frozen-lockfile --ignore-scripts
|
||||
- name: build
|
||||
run: pnpm build
|
||||
- name: Test
|
||||
run: pnpm test
|
||||
ci-e2e-ui:
|
||||
needs: build
|
||||
needs: build14
|
||||
runs-on: ubuntu-latest
|
||||
name: UI Test E2E Node 14
|
||||
steps:
|
||||
|
@ -165,22 +162,22 @@ jobs:
|
|||
with:
|
||||
name: verdaccio-artifact
|
||||
- name: untar packages
|
||||
run: tar -xzvf pkg.tar.gz -C ${{ github.workspace }}/packages
|
||||
run: tar -xzvf pkg.tar.gz -C ${{ github.workspace }}/packages
|
||||
- name: Install pnpm
|
||||
run: npm i pnpm@6.24.1 -g
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
- name: Install
|
||||
## we need scripts, pupetter downloads aditional content
|
||||
run: pnpm recursive install --frozen-lockfile
|
||||
run: pnpm recursive install --frozen-lockfile
|
||||
- name: Test UI
|
||||
run: pnpm test:e2e:ui
|
||||
# env:
|
||||
# DEBUG: verdaccio:e2e*
|
||||
# DEBUG: verdaccio:e2e*
|
||||
ci-e2e-cli:
|
||||
needs: build
|
||||
needs: build14
|
||||
runs-on: ubuntu-latest
|
||||
name: CLI Test E2E Node 14
|
||||
steps:
|
||||
|
@ -192,45 +189,22 @@ jobs:
|
|||
with:
|
||||
name: verdaccio-artifact
|
||||
- name: untar packages
|
||||
run: tar -xzvf pkg.tar.gz -C ${{ github.workspace }}/packages
|
||||
run: tar -xzvf pkg.tar.gz -C ${{ github.workspace }}/packages
|
||||
- name: Install pnpm
|
||||
run: npm i pnpm@6.24.1 -g
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
- name: Install
|
||||
## we need scripts, pupetter downloads aditional content
|
||||
run: pnpm recursive install --frozen-lockfile
|
||||
- name: Test CLI
|
||||
run: pnpm test:e2e:cli
|
||||
env:
|
||||
DEBUG: verdaccio*
|
||||
test-windows:
|
||||
needs: [format, lint]
|
||||
runs-on: windows-latest
|
||||
name: windows test node 14
|
||||
steps:
|
||||
- uses: actions/checkout@v2.4.0
|
||||
- name: Use Node 14
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 14
|
||||
- name: Install pnpm
|
||||
run: npm i pnpm@6.24.1 -g
|
||||
# pnpm cache is not working for windows (we need a solution)
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
- name: Install
|
||||
run: pnpm recursive install --frozen-lockfile --ignore-scripts
|
||||
- name: build
|
||||
run: pnpm build
|
||||
- name: Test
|
||||
run: pnpm test
|
||||
DEBUG: verdaccio*
|
||||
sync-translations:
|
||||
needs: [ci-e2e-cli, ci-e2e-ui, test-windows, test]
|
||||
needs: [ci-e2e-cli, ci-e2e-ui, build14]
|
||||
runs-on: ubuntu-latest
|
||||
name: synchronize translations
|
||||
if: (github.event_name == 'push' && github.ref == 'refs/heads/master') || github.event_name == 'workflow_dispatch'
|
||||
|
@ -243,21 +217,21 @@ jobs:
|
|||
with:
|
||||
name: verdaccio-artifact
|
||||
- name: untar packages
|
||||
run: tar -xzvf pkg.tar.gz -C ${{ github.workspace }}/packages
|
||||
run: tar -xzvf pkg.tar.gz -C ${{ github.workspace }}/packages
|
||||
- name: Install pnpm
|
||||
run: npm i pnpm@6.24.1 -g
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
- name: Install
|
||||
## we need scripts, pupetter downloads aditional content
|
||||
run: pnpm recursive install --frozen-lockfile
|
||||
- name: generate website translations
|
||||
run: pnpm write-translations --filter ...@verdaccio/website
|
||||
run: pnpm write-translations --filter ...@verdaccio/website
|
||||
- name: sync
|
||||
env:
|
||||
CROWDIN_VERDACCIO_PROJECT_ID: ${{ secrets.CROWDIN_VERDACCIO_PROJECT_ID }}
|
||||
CROWDIN_VERDACCIO_API_KEY: ${{ secrets.CROWDIN_VERDACCIO_API_KEY }}
|
||||
CONTEXT: production
|
||||
run: pnpm crowdin:sync
|
||||
run: pnpm crowdin:sync
|
||||
|
|
|
@ -119,7 +119,7 @@ describe('StorageTest', () => {
|
|||
expect(notcachedSpy).toHaveBeenCalledTimes(0);
|
||||
expect(cachedSpy).toHaveBeenCalledTimes(1);
|
||||
expect(cachedSpy).toHaveBeenCalledWith(
|
||||
'http://0.0.0.0:55548/jquery/-/jquery-1.5.1.tgz'
|
||||
'http://localhost:55548/jquery/-/jquery-1.5.1.tgz'
|
||||
);
|
||||
res();
|
||||
});
|
||||
|
@ -139,7 +139,7 @@ describe('StorageTest', () => {
|
|||
expect(cachedSpy).toHaveBeenCalledTimes(0);
|
||||
expect(notcachedSpy).toHaveBeenCalledTimes(1);
|
||||
expect(notcachedSpy).toHaveBeenCalledWith(
|
||||
'http://0.0.0.0:55548/@jquery%2fjquery/-/jquery-1.5.1.tgz'
|
||||
'http://localhost:55548/@jquery%2fjquery/-/jquery-1.5.1.tgz'
|
||||
);
|
||||
res();
|
||||
});
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
export const DOMAIN_SERVERS = '0.0.0.0';
|
||||
export const DOMAIN_SERVERS = 'localhost';
|
||||
export const CREDENTIALS = {
|
||||
user: 'test',
|
||||
password: 'test',
|
||||
|
|
|
@ -1 +1 @@
|
|||
export const DOMAIN_SERVERS = '0.0.0.0';
|
||||
export const DOMAIN_SERVERS = 'localhost';
|
||||
|
|
Loading…
Add table
Reference in a new issue