From 492b946989da06b834979dfa8afe4c7836e32719 Mon Sep 17 00:00:00 2001 From: Vasco Santos Date: Fri, 9 Apr 2021 10:22:15 +0200 Subject: [PATCH] chore: add github actions --- .github/workflows/main.yml | 48 ++++++++++++++++++++++++++++++++++++++ .travis.yml | 48 -------------------------------------- 2 files changed, 48 insertions(+), 48 deletions(-) create mode 100644 .github/workflows/main.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..7f343ac --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,48 @@ +name: ci +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - run: npm install + - run: npx aegir lint + - run: npx aegir dep-check -- -i wrtc -i electron-webrtc + - run: npx aegir build --no-types + test-node: + needs: check + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [windows-latest, ubuntu-latest, macos-latest] + node: [14, 15] + fail-fast: true + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node }} + - run: npm install + - 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/checkout@v2 + - run: npm install + - run: npx aegir test -t browser -t webworker --bail + test-firefox: + needs: check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - run: npm install + - run: npx aegir test -t browser -t webworker --bail -- --browsers FirefoxHeadless \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index cadab04..0000000 --- a/.travis.yml +++ /dev/null @@ -1,48 +0,0 @@ -language: node_js -cache: npm -sudo: false - -stages: - - check - - test - - cov - -node_js: - - '10' - - '12' - -os: - - linux - - osx - - windows - -before_script: - - if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6'; fi - -script: npx nyc -s npm run test:node -- --bail -after_success: npx nyc report --reporter=text-lcov > coverage.lcov && npx codecov - -jobs: - include: - - stage: check - script: - - npx aegir build --bundlesize - - npx aegir dep-check - - npm run lint - - - stage: test - name: chrome - addons: - chrome: stable - script: - - npx aegir test -t browser - - - stage: test - name: firefox - addons: - firefox: latest - script: - - npx aegir test -t browser -- --browsers FirefoxHeadless - -notifications: - email: false