Skip to content

Commit 6d20f89

Browse files
Raphaël DrozRaphaël Droz
andauthored
Use Github actions without Travis (#361)
Co-authored-by: Raphaël Droz <raphael.droz+floss@gmail.com>
1 parent a0baa02 commit 6d20f89

File tree

4 files changed

+67
-59
lines changed

4 files changed

+67
-59
lines changed

.github/workflows/actions.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: "CI"
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- 'feature/*'
8+
workflow_dispatch:
9+
10+
env:
11+
SAUCE_USERNAME: ${{secrets.SAUCE_USERNAME}}
12+
SAUCE_ACCESS_KEY: ${{secrets.SAUCE_ACCESS_KEY}}
13+
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}
14+
DISPLAY: ':99.0'
15+
jobs:
16+
prepare:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v2
21+
22+
- name: Install node.js
23+
uses: actions/setup-node@v1
24+
with:
25+
node-version: 14.x
26+
27+
- name: Install xvfb
28+
run: |
29+
sudo apt-get install xvfb
30+
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
31+
32+
- name: Install dependencies
33+
run: |
34+
npm install
35+
npm install -g grunt-cli
36+
node_modules/.bin/rollup -c
37+
38+
- name: Install saucectl
39+
uses: saucelabs/saucectl-run-action@v1
40+
with:
41+
skip-run: true
42+
testing-environment: ""
43+
concurrency: 10
44+
45+
- run: grunt --version
46+
47+
- name: Run tests
48+
run: grunt karma:saucelabs
49+
50+
- name: Run code coverage
51+
uses: paambaati/codeclimate-action@v2.7.5
52+
with:
53+
coverageCommand: grunt karma:coverage
54+
debug: true
55+
prefix: .
56+
coverageLocations: |
57+
${{github.workspace}}/coverage/lcov/result.lcov:lcov
58+
59+
- name: debug
60+
run: ls -lhR coverage

.travis.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.

karma.conf.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,13 @@ module.exports = function(config) {
108108
// test results reporter to use
109109
// possible values: 'dots', 'progress', 'junit', 'growl', 'coverage'
110110
reporters: ['progress', 'coverage'],
111-
coverageReporter: [
112-
{type: "lcov", dir: "coverage", subdir: "."}
113-
],
111+
coverageReporter: {
112+
dir: "coverage",
113+
reporters: [
114+
{type: "lcov", subdir: "."},
115+
{type: "lcovonly", subdir: "lcov", file: "result.lcov"}
116+
]
117+
},
114118

115119
// web server port
116120
port: 9876,

travis.sh

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)