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:
Juan Picado 2021-12-29 19:23:20 +01:00 committed by GitHub
parent 4fd84f589b
commit 52d3442856
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 37 additions and 63 deletions

View File

@ -85,9 +85,9 @@ jobs:
- name: Lint - name: Lint
run: pnpm format:check run: pnpm format:check
build: build14:
runs-on: ubuntu-latest runs-on: ubuntu-latest
name: build name: build-node-14
needs: [format, lint] needs: [format, lint]
steps: steps:
- uses: actions/checkout@v2.4.0 - uses: actions/checkout@v2.4.0
@ -121,14 +121,14 @@ jobs:
with: with:
name: verdaccio-artifact name: verdaccio-artifact
path: pkg.tar.gz path: pkg.tar.gz
test: build:
needs: build needs: [format, lint]
strategy: strategy:
fail-fast: true fail-fast: true
matrix: matrix:
os: [ubuntu-latest] os: [ubuntu-latest, windows-latest]
## Node 16 breaks UI test, jest issue ## Node 16 breaks UI test, jest issue
node_version: [14] node_version: [14, 16, 17]
name: ${{ matrix.os }} / Node ${{ matrix.node_version }} name: ${{ matrix.os }} / Node ${{ matrix.node_version }}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
@ -137,11 +137,6 @@ jobs:
uses: actions/setup-node@v1 uses: actions/setup-node@v1
with: with:
node-version: ${{ matrix.node_version }} 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 - name: Install pnpm
run: npm i pnpm@6.24.1 -g run: npm i pnpm@6.24.1 -g
- uses: actions/cache@v2 - uses: actions/cache@v2
@ -150,10 +145,12 @@ jobs:
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }} key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
- name: Install - 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 - name: Test
run: pnpm test run: pnpm test
ci-e2e-ui: ci-e2e-ui:
needs: build needs: build14
runs-on: ubuntu-latest runs-on: ubuntu-latest
name: UI Test E2E Node 14 name: UI Test E2E Node 14
steps: steps:
@ -180,7 +177,7 @@ jobs:
# env: # env:
# DEBUG: verdaccio:e2e* # DEBUG: verdaccio:e2e*
ci-e2e-cli: ci-e2e-cli:
needs: build needs: build14
runs-on: ubuntu-latest runs-on: ubuntu-latest
name: CLI Test E2E Node 14 name: CLI Test E2E Node 14
steps: steps:
@ -206,31 +203,8 @@ jobs:
run: pnpm test:e2e:cli run: pnpm test:e2e:cli
env: env:
DEBUG: verdaccio* 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
sync-translations: sync-translations:
needs: [ci-e2e-cli, ci-e2e-ui, test-windows, test] needs: [ci-e2e-cli, ci-e2e-ui, build14]
runs-on: ubuntu-latest runs-on: ubuntu-latest
name: synchronize translations name: synchronize translations
if: (github.event_name == 'push' && github.ref == 'refs/heads/master') || github.event_name == 'workflow_dispatch' if: (github.event_name == 'push' && github.ref == 'refs/heads/master') || github.event_name == 'workflow_dispatch'

View File

@ -119,7 +119,7 @@ describe('StorageTest', () => {
expect(notcachedSpy).toHaveBeenCalledTimes(0); expect(notcachedSpy).toHaveBeenCalledTimes(0);
expect(cachedSpy).toHaveBeenCalledTimes(1); expect(cachedSpy).toHaveBeenCalledTimes(1);
expect(cachedSpy).toHaveBeenCalledWith( 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(); res();
}); });
@ -139,7 +139,7 @@ describe('StorageTest', () => {
expect(cachedSpy).toHaveBeenCalledTimes(0); expect(cachedSpy).toHaveBeenCalledTimes(0);
expect(notcachedSpy).toHaveBeenCalledTimes(1); expect(notcachedSpy).toHaveBeenCalledTimes(1);
expect(notcachedSpy).toHaveBeenCalledWith( 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(); res();
}); });

View File

@ -1,4 +1,4 @@
export const DOMAIN_SERVERS = '0.0.0.0'; export const DOMAIN_SERVERS = 'localhost';
export const CREDENTIALS = { export const CREDENTIALS = {
user: 'test', user: 'test',
password: 'test', password: 'test',

View File

@ -1 +1 @@
export const DOMAIN_SERVERS = '0.0.0.0'; export const DOMAIN_SERVERS = 'localhost';