mirror of
https://github.com/fluencelabs/js-libp2p-noise
synced 2025-04-25 05:52:29 +00:00
add test steps to ga ci and remove travis
This commit is contained in:
parent
1b13e579ce
commit
cd4ed118ee
132
.github/workflows/ci.yml
vendored
132
.github/workflows/ci.yml
vendored
@ -8,7 +8,7 @@ on:
|
||||
|
||||
jobs:
|
||||
check:
|
||||
name: Lint
|
||||
name: Lint and Typecheck
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/setup-node@v1
|
||||
@ -28,19 +28,119 @@ jobs:
|
||||
- run: yarn --prefer-offline --frozen-lockfile
|
||||
- run: yarn run check
|
||||
- run: yarn run build
|
||||
- uses: ipfs/aegir/actions/bundle-size@master
|
||||
name: Check bundle size
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
# LArge bundle because of node-forge and bcrypto
|
||||
# - uses: ipfs/aegir/actions/bundle-size@master
|
||||
# name: Check bundle size
|
||||
# with:
|
||||
# github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
# ci:
|
||||
# name: Build and Test
|
||||
# strategy:
|
||||
# matrix:
|
||||
# node: [12, 14]
|
||||
# os: ["ubuntu-latest", "macos-latest", "windows-latest"]
|
||||
# runs-on: ${{ matrix.os }}
|
||||
# steps:
|
||||
# - uses: actions/setup-node@v1
|
||||
# with:
|
||||
# node-version: ${{ matrix.node }}
|
||||
test-node:
|
||||
name: Test Nodejs
|
||||
needs: check
|
||||
strategy:
|
||||
matrix:
|
||||
node: [12, 14]
|
||||
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
- uses: actions/checkout@v2
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
- uses: actions/cache@v2
|
||||
id: yarn-cache
|
||||
with:
|
||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
- run: yarn --prefer-offline --frozen-lockfile
|
||||
- run: npx nyc --reporter=lcov aegir test -t node -- --bail
|
||||
- uses: codecov/codecov-action@v1
|
||||
|
||||
test-chrome:
|
||||
needs: check
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
- uses: actions/checkout@v2
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
- uses: actions/cache@v2
|
||||
id: yarn-cache
|
||||
with:
|
||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
- run: yarn --prefer-offline --frozen-lockfile
|
||||
- run: npx aegir test -t browser -t webworker --bail
|
||||
|
||||
test-firefox:
|
||||
needs: check
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
- uses: actions/checkout@v2
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
- uses: actions/cache@v2
|
||||
id: yarn-cache
|
||||
with:
|
||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
- run: yarn --prefer-offline --frozen-lockfile
|
||||
- run: npx aegir test -t browser -t webworker --bail -- --browsers FirefoxHeadless
|
||||
|
||||
test-electron-main:
|
||||
needs: check
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
- uses: actions/checkout@v2
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
- uses: actions/cache@v2
|
||||
id: yarn-cache
|
||||
with:
|
||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
- run: yarn --prefer-offline --frozen-lockfile
|
||||
- run: npx xvfb-maybe aegir test -t electron-main --bail
|
||||
|
||||
test-electron-renderer:
|
||||
needs: check
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
- uses: actions/checkout@v2
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
- uses: actions/cache@v2
|
||||
id: yarn-cache
|
||||
with:
|
||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
- run: yarn --prefer-offline --frozen-lockfile
|
||||
- run: npx xvfb-maybe aegir test -t electron-renderer --bail
|
||||
|
58
.travis.yml
58
.travis.yml
@ -1,58 +0,0 @@
|
||||
language: node_js
|
||||
cache: yarn
|
||||
stages:
|
||||
- check
|
||||
- test
|
||||
- cov
|
||||
|
||||
env:
|
||||
- YARN_GPG=no
|
||||
|
||||
node_js:
|
||||
- '12'
|
||||
- '14'
|
||||
|
||||
os:
|
||||
- linux
|
||||
- osx
|
||||
- windows
|
||||
|
||||
script: npx nyc -s yarn run test:node --bail
|
||||
after_success:
|
||||
- npm install -g travis-deploy-once
|
||||
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then travis-deploy-once "npx nyc report --reporter=text-lcov > coverage.lcov && npx codecov"; fi
|
||||
|
||||
jobs:
|
||||
include:
|
||||
- stage: check
|
||||
script:
|
||||
- yarn run check
|
||||
- yarn run lint
|
||||
- yarn run build
|
||||
|
||||
- stage: test
|
||||
name: chrome
|
||||
addons:
|
||||
chrome: stable
|
||||
script: npx aegir test -t browser -t webworker
|
||||
|
||||
- stage: test
|
||||
name: firefox
|
||||
addons:
|
||||
firefox: latest
|
||||
script: npx aegir test -t browser -t webworker -- --browsers FirefoxHeadless
|
||||
|
||||
- stage: test
|
||||
name: electron-main
|
||||
os: osx
|
||||
script:
|
||||
- npx aegir test -t electron-main --bail
|
||||
|
||||
- stage: test
|
||||
name: electron-renderer
|
||||
os: osx
|
||||
script:
|
||||
- npx aegir test -t electron-renderer --bail
|
||||
|
||||
notifications:
|
||||
email: false
|
Loading…
x
Reference in New Issue
Block a user