2020-06-18 16:01:57 -05:00
|
|
|
on:
|
|
|
|
schedule:
|
|
|
|
- cron: '0 3 * * 5'
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- '**'
|
|
|
|
|
|
|
|
name: 'E2E Jest with verdaccio'
|
|
|
|
jobs:
|
|
|
|
yarn:
|
|
|
|
name: 'yarn:jest example'
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
2020-10-03 07:53:41 -05:00
|
|
|
- uses: actions/checkout@v2.3.3
|
2020-06-18 16:01:57 -05:00
|
|
|
|
|
|
|
- name: 'Use Node.js 10.x'
|
2020-07-31 00:55:04 -05:00
|
|
|
uses: actions/setup-node@v2.1.1
|
2020-06-18 16:01:57 -05:00
|
|
|
with:
|
|
|
|
node-version: 10.x
|
|
|
|
- name: Install Dependencies
|
2020-10-11 12:06:21 -05:00
|
|
|
run: yarn install
|
2020-06-18 16:01:57 -05:00
|
|
|
- name: 'Run verdaccio in the background'
|
|
|
|
run: |
|
2020-10-09 11:53:44 -05:00
|
|
|
nohup node ./scripts/run-verdaccio.js --config ./scripts/e2e-config.yaml &
|
2020-06-18 16:01:57 -05:00
|
|
|
- name: 'Ping to verdaccio'
|
|
|
|
run: |
|
|
|
|
npm ping --registry http://localhost:4873
|
|
|
|
- name: 'Running the integration test'
|
|
|
|
run: |
|
|
|
|
source scripts/e2e-setup-ci.sh
|
|
|
|
yarn init --yes
|
|
|
|
yarn add jest --registry http://localhost:4873
|
|
|
|
|
|
|
|
echo "it('should pass', () => { expect(true).toBeTruthy(); });" | tee pass.test.js
|
|
|
|
yarn jest pass.test.js
|
|
|
|
|
|
|
|
yarn add left-pad --registry http://localhost:4873 --verbose
|
|
|
|
echo "const leftPad = require('left-pad'); it('should resolve a module', () => { expect(typeof leftPad).toBe('function');});" | tee module.test.js
|
|
|
|
yarn jest module.test.js
|
2020-10-09 11:53:44 -05:00
|
|
|
yarn2:
|
|
|
|
name: 'yarn2:jest example'
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2.3.3
|
|
|
|
|
|
|
|
- name: 'Use Node.js 10.x'
|
|
|
|
uses: actions/setup-node@v2.1.1
|
|
|
|
with:
|
|
|
|
node-version: 10.x
|
|
|
|
- name: Install Dependencies
|
2020-10-11 12:06:21 -05:00
|
|
|
run: yarn install
|
2020-10-09 11:53:44 -05:00
|
|
|
- name: 'Run verdaccio in the background'
|
|
|
|
run: |
|
|
|
|
nohup node ./scripts/run-verdaccio.js --config ./scripts/e2e-config.yaml &
|
|
|
|
- name: 'Ping to verdaccio'
|
|
|
|
run: |
|
|
|
|
npm ping --registry http://localhost:4873
|
|
|
|
- name: 'Running the integration test'
|
|
|
|
run: |
|
|
|
|
source scripts/e2e-setup-ci.sh
|
|
|
|
yarn init --yes
|
|
|
|
yarn set version berry
|
|
|
|
yarn config set npmRegistryServer "http://localhost:4873"
|
|
|
|
yarn config set unsafeHttpWhitelist --json '["localhost"]'
|
|
|
|
yarn add jest
|
|
|
|
|
|
|
|
echo "it('should pass', () => { expect(true).toBeTruthy(); });" | tee pass.test.js
|
|
|
|
yarn jest pass.test.js
|
|
|
|
|
|
|
|
yarn add left-pad
|
|
|
|
echo "const leftPad = require('left-pad'); it('should resolve a module', () => { expect(typeof leftPad).toBe('function');});" | tee module.test.js
|
2020-10-11 12:06:21 -05:00
|
|
|
yarn jest module.test.js
|
2020-06-18 16:01:57 -05:00
|
|
|
npm:
|
|
|
|
name: 'npm:jest example'
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
2020-10-03 07:53:41 -05:00
|
|
|
- uses: actions/checkout@v2.3.3
|
2020-06-18 16:01:57 -05:00
|
|
|
|
|
|
|
- name: 'Use Node.js 10.x'
|
2020-07-31 00:55:04 -05:00
|
|
|
uses: actions/setup-node@v2.1.1
|
2020-06-18 16:01:57 -05:00
|
|
|
with:
|
|
|
|
node-version: 10.x
|
|
|
|
- name: 'install latest npm'
|
|
|
|
run: npm i -g npm
|
|
|
|
- name: Install Dependencies
|
2020-10-11 12:06:21 -05:00
|
|
|
run: yarn install
|
2020-06-18 16:01:57 -05:00
|
|
|
- name: 'Run verdaccio in the background'
|
|
|
|
run: |
|
2020-10-09 11:53:44 -05:00
|
|
|
nohup node ./scripts/run-verdaccio.js --config ./scripts/e2e-config.yaml &
|
2020-06-18 16:01:57 -05:00
|
|
|
- name: 'Ping to verdaccio'
|
|
|
|
run: |
|
|
|
|
npm ping --registry http://localhost:4873
|
|
|
|
- name: 'Running the integration test'
|
|
|
|
run: |
|
|
|
|
source scripts/e2e-setup-ci.sh
|
|
|
|
npm init --force
|
|
|
|
npm install jest --registry http://localhost:4873
|
|
|
|
|
|
|
|
echo "it('should pass', () => { expect(true).toBeTruthy(); });" | tee pass.test.js
|
|
|
|
yarn jest pass.test.js
|
|
|
|
|
|
|
|
yarn add left-pad --registry http://localhost:4873 --verbose
|
|
|
|
echo "const leftPad = require('left-pad'); it('should resolve a module', () => { expect(typeof leftPad).toBe('function');});" | tee module.test.js
|
|
|
|
yarn jest module.test.js
|
2020-10-09 11:53:44 -05:00
|
|
|
npm7:
|
|
|
|
name: 'npm7:jest example'
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2.3.3
|
|
|
|
|
|
|
|
- name: 'Use Node.js 10.x'
|
|
|
|
uses: actions/setup-node@v2.1.1
|
|
|
|
with:
|
|
|
|
node-version: 10.x
|
|
|
|
- name: 'install latest npm'
|
|
|
|
run: npm i -g npm@next-7
|
|
|
|
- name: Install Dependencies
|
2020-10-11 12:06:21 -05:00
|
|
|
run: yarn install
|
2020-10-09 11:53:44 -05:00
|
|
|
- name: 'Run verdaccio in the background'
|
|
|
|
run: |
|
|
|
|
nohup node ./scripts/run-verdaccio.js --config ./scripts/e2e-config.yaml &
|
|
|
|
- name: 'Ping to verdaccio'
|
|
|
|
run: |
|
|
|
|
npm ping --registry http://localhost:4873
|
|
|
|
- name: 'Running the integration test'
|
|
|
|
run: |
|
|
|
|
source scripts/e2e-setup-ci.sh
|
|
|
|
npm init --force
|
|
|
|
npm install jest --registry http://localhost:4873
|
|
|
|
|
|
|
|
echo "it('should pass', () => { expect(true).toBeTruthy(); });" | tee pass.test.js
|
|
|
|
yarn jest pass.test.js
|
|
|
|
|
|
|
|
yarn add left-pad --registry http://localhost:4873 --verbose
|
|
|
|
echo "const leftPad = require('left-pad'); it('should resolve a module', () => { expect(typeof leftPad).toBe('function');});" | tee module.test.js
|
|
|
|
yarn jest module.test.js
|
|
|
|
|
2020-06-18 16:01:57 -05:00
|
|
|
pnpm:
|
|
|
|
name: 'pnpm:jest example'
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
2020-10-03 07:53:41 -05:00
|
|
|
- uses: actions/checkout@v2.3.3
|
2020-06-18 16:01:57 -05:00
|
|
|
|
|
|
|
- name: 'Use Node.js 10.x'
|
2020-07-31 00:55:04 -05:00
|
|
|
uses: actions/setup-node@v2.1.1
|
2020-06-18 16:01:57 -05:00
|
|
|
with:
|
|
|
|
node-version: 10.x
|
|
|
|
- name: 'install latest pnpm'
|
|
|
|
run: npm i -g pnpm
|
|
|
|
- name: Install Dependencies
|
2020-10-11 12:06:21 -05:00
|
|
|
run: yarn install
|
2020-06-18 16:01:57 -05:00
|
|
|
- name: 'Run verdaccio in the background'
|
|
|
|
run: |
|
|
|
|
nohup node ./scripts/run-verdaccio.js &
|
|
|
|
- name: 'Ping to verdaccio'
|
|
|
|
run: |
|
|
|
|
pnpm ping --registry http://localhost:4873
|
|
|
|
- name: 'Running the integration test'
|
|
|
|
run: |
|
|
|
|
source scripts/e2e-setup-ci.sh
|
|
|
|
pnpm init --force
|
|
|
|
pnpm install jest --registry http://localhost:4873
|
|
|
|
|
|
|
|
echo "it('should pass', () => { expect(true).toBeTruthy(); });" | tee pass.test.js
|
|
|
|
yarn jest pass.test.js
|
|
|
|
|
|
|
|
yarn add left-pad --registry http://localhost:4873 --verbose
|
|
|
|
echo "const leftPad = require('left-pad'); it('should resolve a module', () => { expect(typeof leftPad).toBe('function');});" | tee module.test.js
|
|
|
|
yarn jest module.test.js
|
|
|
|
|