Skip to content

Commit

Permalink
Run tests using a Github Action (#30)
Browse files Browse the repository at this point in the history
* Switch to Github actions.

* Create node.js.yml

* Install packages with yarn.

* Use yarn install instead of ci.

* Use sauceconnect step.

* Fix yaml format.

* Add credentials back.

* Fix tunnel identificator.

* Try to run tests without env variables.

* Adding back the credentials.

* Remove travis.

* Add Coveralls.
  • Loading branch information
dompuiu committed Nov 15, 2020
1 parent c5d0ffd commit 8d0a6d1
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 18 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: yarn install
- 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 }}
10 changes: 0 additions & 10 deletions .travis.yml

This file was deleted.

6 changes: 3 additions & 3 deletions README.md
@@ -1,6 +1,6 @@
# Core Extension for Adobe Experience Platform Launch

[![Build Status](https://travis-ci.com/adobe/reactor-extension-core.svg?branch=master)](https://travis-ci.com/adobe/reactor-extension-core)
[![Build Status](https://img.shields.io/github/workflow/status/adobe/reactor-extension-core/ci?style=flat)](https://github.com/adobe/reactor-extension-core/actions)
[![Coverage Status](https://coveralls.io/repos/github/adobe/reactor-extension-core/badge.svg?branch=master)](https://coveralls.io/github/adobe/reactor-extension-core?branch=master)

This is the Core extension for [Adobe Experience Platform Launch](https://www.adobe.com/experience-platform/launch.html). It provides default event, condition, and data element types available to all Launch properties.
Expand All @@ -10,7 +10,7 @@ This is the Core extension for [Adobe Experience Platform Launch](https://www.ad
Contributions are welcomed! Read the [Contributing Guide](CONTRIBUTING.md) for more information about how our community works.

1. [Install node.js](https://nodejs.org/).
1. [Install Yarn](https://yarnpkg.com/en/docs/install).
1. [Install Yarn](https://yarnpkg.com/en/docs/install).
1. Clone this repository.
1. After navigating into the project directory, install project dependencies by running `yarn install`.

Expand All @@ -25,7 +25,7 @@ Thank you for your interest in contributing!

## Internal Dependencies

This project depends on the @react/react-spectrum package which depends on the @react/collection-view package. Neither package is published to the public npm repository. In order to support their installation and use, they have been included in this project as tar files. Each file has been prepended with the following message regarding the license:
This project depends on the @react/react-spectrum package which depends on the @react/collection-view package. Neither package is published to the public npm repository. In order to support their installation and use, they have been included in this project as tar files. Each file has been prepended with the following message regarding the license:

```js
/**
Expand Down
10 changes: 5 additions & 5 deletions karma.conf.js
Expand Up @@ -10,12 +10,12 @@ let startConnect = false;
const reporters = ['dots'];
let buildId;

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

defaultBrowsers = [
Expand Down Expand Up @@ -234,7 +234,7 @@ module.exports = config => {
sauceLabs: {
buildId: buildId,
testName: packageDescriptor.name + ' Test',
tunnelIdentifier: process.env.TRAVIS_JOB_NUMBER,
tunnelIdentifier: 'github-action-tunnel',
startConnect: startConnect,
retryLimit: 3,
recordVideo: false,
Expand Down

0 comments on commit 8d0a6d1

Please sign in to comment.