2020-06-18 16:01:57 -05:00
|
|
|
on:
|
|
|
|
schedule:
|
|
|
|
- cron: '0 3 * * 5'
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- '**'
|
|
|
|
|
|
|
|
name: 'E2E Jest with verdaccio'
|
|
|
|
jobs:
|
|
|
|
yarn:
|
2020-09-01 14:22:36 -05:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest, windows-latest]
|
|
|
|
|
|
|
|
name: '${{ matrix.os }} / yarn:jest example'
|
2020-08-31 15:21:38 -05:00
|
|
|
runs-on: ${{ matrix.os }}
|
2020-06-18 16:01:57 -05:00
|
|
|
|
|
|
|
steps:
|
2020-09-01 14:22:36 -05:00
|
|
|
- uses: actions/checkout@v2.3.1
|
2020-06-18 16:01:57 -05:00
|
|
|
|
2020-09-01 14:22:36 -05:00
|
|
|
- name: 'Use Node.js 10.x'
|
|
|
|
uses: actions/setup-node@v2.1.1
|
2020-06-18 16:01:57 -05:00
|
|
|
with:
|
2020-09-01 14:22:36 -05:00
|
|
|
node-version: 10.x
|
2020-06-18 16:01:57 -05:00
|
|
|
- name: Install Dependencies
|
2020-09-01 14:22:36 -05:00
|
|
|
run: yarn install --pure-lockfile
|
2020-06-18 16:01:57 -05:00
|
|
|
- name: 'Run verdaccio in the background'
|
|
|
|
run: |
|
2020-09-01 14:22:36 -05:00
|
|
|
nohup node ./scripts/run-verdaccio.js &
|
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
|
|
|
|
npm:
|
2020-09-01 14:22:36 -05:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest, windows-latest]
|
2020-06-18 16:01:57 -05:00
|
|
|
|
2020-09-01 14:22:36 -05:00
|
|
|
name: '${{ matrix.os }} / npm:jest example'
|
|
|
|
runs-on: ${{ matrix.os }}
|
2020-10-09 11:53:44 -05:00
|
|
|
|
|
|
|
steps:
|
2020-09-01 14:22:36 -05:00
|
|
|
- uses: actions/checkout@v2.3.1
|
2020-10-09 11:53:44 -05:00
|
|
|
|
2020-09-01 14:22:36 -05:00
|
|
|
- name: 'Use Node.js 10.x'
|
|
|
|
uses: actions/setup-node@v2.1.1
|
2020-10-09 11:53:44 -05:00
|
|
|
with:
|
2020-09-01 14:22:36 -05:00
|
|
|
node-version: 10.x
|
2020-10-09 11:53:44 -05:00
|
|
|
- name: 'install latest npm'
|
2021-02-25 15:06:10 -05:00
|
|
|
run: npm i -g npm
|
2020-10-09 11:53:44 -05:00
|
|
|
- name: Install Dependencies
|
2020-09-01 14:22:36 -05:00
|
|
|
run: yarn install --pure-lockfile
|
2020-10-09 11:53:44 -05:00
|
|
|
- name: 'Run verdaccio in the background'
|
|
|
|
run: |
|
2020-09-01 14:22:36 -05:00
|
|
|
nohup node ./scripts/run-verdaccio.js &
|
2020-10-09 11:53:44 -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-06-18 16:01:57 -05:00
|
|
|
pnpm:
|
2020-09-01 14:22:36 -05:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest, windows-latest]
|
|
|
|
|
|
|
|
name: '${{ matrix.os }} / pnpm:jest example'
|
2020-08-31 15:21:38 -05:00
|
|
|
runs-on: ${{ matrix.os }}
|
2020-06-18 16:01:57 -05:00
|
|
|
|
|
|
|
steps:
|
2020-09-01 14:22:36 -05:00
|
|
|
- uses: actions/checkout@v2.3.1
|
2020-06-18 16:01:57 -05:00
|
|
|
|
2020-09-01 14:22:36 -05:00
|
|
|
- name: 'Use Node.js 10.x'
|
|
|
|
uses: actions/setup-node@v2.1.1
|
2020-06-18 16:01:57 -05:00
|
|
|
with:
|
2020-09-01 14:22:36 -05:00
|
|
|
node-version: 10.x
|
2020-06-18 16:01:57 -05:00
|
|
|
- name: 'install latest pnpm'
|
|
|
|
run: npm i -g pnpm
|
|
|
|
- name: Install Dependencies
|
2020-09-01 14:22:36 -05:00
|
|
|
run: yarn install --pure-lockfile
|
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
|