From 472f0a9e0616cbedc191d213d9ed6a213a1981e3 Mon Sep 17 00:00:00 2001 From: Brikend Date: Thu, 23 Dec 2021 09:42:07 +0100 Subject: [PATCH] feat: replace travis with github actions --- .github/workflows/build.yml | 54 +++++++++++++++++++++++++++++++++++++ .travis.yml | 47 -------------------------------- 2 files changed, 54 insertions(+), 47 deletions(-) create mode 100644 .github/workflows/build.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..9e30f9e --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,54 @@ +# This workflow will run build the typescript source files, run linter and prettier +name: CI Check + +on: + # Trigger the workflow on push or pull request, + # but only for the main branch + push: + branches: + - master + pull_request: + branches: + - '*' + +jobs: + build: + name: "Build & Test" + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ + ubuntu-latest, + macos-latest + ] + node-version: [ + 11, + 12, + 14 + ] + + steps: + - name: Checkout repo and submodules + uses: actions/checkout@v2 + with: + submodules: recursive + + - name: "Pre-Install hook Ubuntu" + if: matrix.os == 'ubuntu-latest' + run: | + sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test + sudo apt update + sudo apt install -y gcc-8 g++-8 + sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 60 + sudo apt install libudev-dev + + - uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + + - run: npm ci + - run: npm run build + - run: npm run tslint + - run: npm run prettier-check diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d47da1d..0000000 --- a/.travis.yml +++ /dev/null @@ -1,47 +0,0 @@ -language: node_js - -script: - - npm run build - - npm run test - - npm run upload-build - -addons: - apt: - packages: - - libudev-dev - -matrix: - include: - - os: linux - dist: xenial - node_js: "11.5.0" - before_install: - - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test - - sudo apt update - - sudo apt-get install -y gcc-8 g++-8 - - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 60 - - os: osx - osx_image: xcode10.1 - node_js: "11.5.0" - - os: linux - dist: xenial - node_js: "12.4.0" - before_install: - - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test - - sudo apt-get update - - sudo apt-get install -y gcc-8 g++-8 - - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 60 - - os: osx - osx_image: xcode10.1 - node_js: "12.4.0" - - os: linux - dist: xenial - node_js: "14.17.3" - before_install: - - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test - - sudo apt-get update - - sudo apt-get install -y gcc-8 g++-8 - - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 60 - - os: osx - osx_image: xcode10.1 - node_js: "14.17.3"