diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..5944e2ec --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,52 @@ +name: main +on: + push: + branches: + - master + pull_request: +jobs: + build-and-test: + strategy: + matrix: + node: + - '10' + - '12' + - '14' + runs-on: ubuntu-latest + name: Tests on Node.js v${{ matrix.node }} + steps: + - name: Checkout repo + uses: actions/checkout@v2 + + - name: Setup node + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node }} + + - name: Download deps + uses: bahmutov/npm-install@v1 + + - name: Build sources + run: npm run build + + - name: Run tests with xvfb available + uses: GabrielBB/xvfb-action@v1 + with: + run: npm run test + + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v2 + + - name: Setup node + uses: actions/setup-node@v1 + with: + node-version: '14.x' + + - name: Download deps + uses: bahmutov/npm-install@v1 + + - name: Run lint + run: npm run lint diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index eb808fe0..00000000 --- a/.travis.yml +++ /dev/null @@ -1,31 +0,0 @@ -language: node_js -sudo: false -branches: - only: - - master -node_js: - - "10" - - "12" - - "14" - - "node" -addons: - apt: - packages: - # Required by Electron - # https://github.com/juliangruber/electron-stream#travis - - xvfb - # Required by Chrome >42 - # https://github.com/electron/electron/issues/1518#issuecomment-97708181 - - libgconf-2-4 -install: - # Required by Electron - - export DISPLAY=':99.0' - - Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & - - npm i -g npm - - npm ci -before_script: - # Building sources - - npm run build -script: - - npm run lint - - npm run test