Skip to content

Commit

Permalink
Start running tests using Github Actions. (#115)
Browse files Browse the repository at this point in the history
* Create node.js.yml

* Run tests using a Github Action.

* Use `npm ci`.

* Define buildId.

* Fix coverage data.

* Put subdir back.

* Fix coveralls badge.
  • Loading branch information
dompuiu committed Nov 15, 2020
1 parent 709d6ee commit 53b541a
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 19 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/node.js.yml
@@ -0,0 +1,37 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: ci

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Use Node.js 14.x
uses: actions/setup-node@v1
with:
node-version: 14.x
- run: npm ci
- run: npm run build --if-present
- uses: saucelabs/sauce-connect-action@master
with:
username: ${{ secrets.SAUCE_USERNAME }}
accessKey: ${{ secrets.SAUCE_ACCESS_KEY }}
tunnelIdentifier: github-action-tunnel
- run: npm test
env:
SAUCE_USERNAME: ${{secrets.SAUCE_USERNAME}}
SAUCE_ACCESS_KEY: ${{secrets.SAUCE_ACCESS_KEY}}
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
9 changes: 0 additions & 9 deletions .travis.yml

This file was deleted.

6 changes: 3 additions & 3 deletions README.md
@@ -1,7 +1,7 @@
# Launch Turbine

[![Build Status](https://travis-ci.com/adobe/reactor-turbine.svg?branch=master)](https://travis-ci.com/adobe/reactor-turbine)
[![Coverage Status](https://coveralls.io/repos/github/Adobe-Marketing-Cloud/reactor-turbine/badge.svg)](https://coveralls.io/github/Adobe-Marketing-Cloud/reactor-turbine)
[![Build Status](https://img.shields.io/github/workflow/status/adobe/reactor-turbine/ci?style=flat)](https://github.com/adobe/reactor-turbine/actions)
[![Coverage Status](https://coveralls.io/repos/github/adobe/reactor-turbine/badge.svg)](https://coveralls.io/github/adobe/reactor-turbine)
[![npm (scoped with tag)](https://img.shields.io/npm/v/@adobe/reactor-turbine.svg?style=flat)](https://www.npmjs.com/package/@adobe/reactor-turbine)

Launch, by Adobe, is a next-generation tag management solution enabling simplified deployment of marketing technologies. For more information regarding Launch, please visit our [product website](http://www.adobe.com/enterprise/cloud-platform/launch.html).
Expand Down Expand Up @@ -47,7 +47,7 @@ Turbine supports the following browsers:
* Firefox (latest)
* Internet Explorer (10 and above)
* iOS Safari (latest)

## Licensing

This project is licensed under the Apache V2 License. See [LICENSE](LICENSE) for more information.
16 changes: 9 additions & 7 deletions karma.conf.js
Expand Up @@ -5,14 +5,16 @@ var path = require('path');
var defaultBrowsers = ['Chrome'];
var reporters = ['dots'];
var startConnect = false;
var buildId;

if (process.env.TRAVIS) {
var buildId =
'TRAVIS #' +
process.env.TRAVIS_BUILD_NUMBER +
if (process.env.CI) {
buildId =
'CI #' +
process.env.GITHUB_RUN_NUMBER +
' (' +
process.env.TRAVIS_BUILD_ID +
process.env.GITHUB_RUN_ID +
')';

defaultBrowsers = [
'SL_IE10',
'SL_IE11',
Expand Down Expand Up @@ -169,7 +171,7 @@ module.exports = function(config) {
sauceLabs: {
buildId: buildId,
testName: 'reactor-turbine Unit Test',
tunnelIdentifier: process.env.TRAVIS_JOB_NUMBER,
tunnelIdentifier: 'github-action-tunnel',
startConnect: startConnect,
retryLimit: 3,
recordVideo: false,
Expand All @@ -191,7 +193,7 @@ module.exports = function(config) {
coverageReporter: {
reporters: [
{ type: 'html' },
{ type: 'lcovonly', subdir: '.', file: 'lcov.dat' }
{ type: 'lcovonly', subdir: '.', file: 'lcov.info' }
]
},

Expand Down

0 comments on commit 53b541a

Please sign in to comment.