Skip to content

Commit

Permalink
fix/test: switching from travis-ci to github-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
divdavem committed Jul 6, 2021
1 parent 5d4f86d commit 3096b5a
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 29 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/ci.yml
@@ -0,0 +1,41 @@
name: ci
on:
push:
branches: [master]
tags: ["**"]
pull_request:
branches: [master]
jobs:
ci:
runs-on: ubuntu-latest
strategy:
matrix:
coverage: [0, 1]
env:
ENABLE_COVERAGE: ${{ matrix.coverage }}
PUPPETEER_INSTANCES: "8"
DISPLAY: ":99.0"
steps:
- uses: actions/checkout@v2
- name: Set Node.js version
uses: actions/setup-node@v2
with:
node-version: "14.17.3"
- uses: actions/cache@v2
with:
path: ~/.npm
key: npm-${{ hashFiles('package-lock.json') }}
restore-keys: |
npm-
- run: npm ci
- run: /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16
- run: npm run ci
- uses: actions/upload-artifact@v2
with:
name: test-results-${{ matrix.coverage }}
path: test/logs/*.json
if: ${{ always() }}
- uses: codecov/codecov-action@v1
with:
directory: test/logs
if: matrix.coverage == 1
27 changes: 0 additions & 27 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions scripts/ciCampaigns.js
Expand Up @@ -16,7 +16,7 @@
var attester = require("attester");
var testConfigBuilder = require("../test/testConfigBuilder");
var robotServer = require("robot-server");
var travis = process.env.TRAVIS === "true";
var ci = process.env.CI === "true";

process.env.PUPPETEER_INSTANCES = process.env.PUPPETEER_INSTANCES || "4";

Expand Down Expand Up @@ -44,7 +44,7 @@ var campaigns = [
}),
testConfigBuilder.buildTestConfig({
campaign: "nopuppeteer",
noFlash: travis,
noFlash: ci,
browsers: [nopuppeteerBrowser]
})
];
Expand Down

0 comments on commit 3096b5a

Please sign in to comment.