Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch from Travis to GitHub Actions. #452

Merged
merged 3 commits into from
Nov 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
117 changes: 117 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
name: CI
'on':
push:
branches:
- master
pull_request:
branches:
- master
jobs:
lint-dockerfile:
name: Lint Dockerfile
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v2
- name: Run Hadolint Dockerfile Linter
uses: burdzwastaken/hadolint-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HADOLINT_ACTION_DOCKERFILE_FOLDER: docker

lint-markdown:
name: Lint Markdown
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v2
- name: Use Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Run Remark Markdown Linter
run: |
npm install
npm run lint:md
- name: Run Textlint Markdown Linter
run: npm run lint:text

lint-code:
name: Lint JavaScript
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v2
- name: Use Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Run EsLint Node.js Linter
run: |
npm install
npm run lint

unit-test:
name: Unit Tests
runs-on: ubuntu-latest
services:
mongodb:
image: mongo:3.6
ports:
- 27017:27017
mosquitto:
image: eclipse-mosquitto:1.6.7
ports:
- 1883:1883
rabbitmq:
image: rabbitmq:3.8.9
ports:
- 5672:5672
strategy:
matrix:
node-version:
- 10.x
- 12.x
steps:
- name: Git checkout
uses: actions/checkout@v2
- name: 'Install Node.js ${{ matrix.node-version }}'
uses: actions/setup-node@v1
with:
node-version: '${{ matrix.node-version }}'
- name: 'Unit Tests with Node.js ${{ matrix.node-version }}'
run: |
npm install
npm test

code-coverage:
name: Coveralls Code Coverage
runs-on: ubuntu-latest
needs: unit-test
services:
mongodb:
image: mongo:3.6
ports:
- 27017:27017
mosquitto:
image: eclipse-mosquitto:1.6.7
ports:
- 1883:1883
rabbitmq:
image: rabbitmq:3.8.9
ports:
- 5672:5672
steps:
- name: Git checkout
uses: actions/checkout@v2
- name: 'Test Coverage with Node.js 12.x'
uses: actions/setup-node@v1
with:
node-version: 12.x
- run: |
npm install
npm run test:coverage
- name: Push to Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
69 changes: 0 additions & 69 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[![Support badge](https://nexus.lab.fiware.org/repository/raw/public/badges/stackoverflow/iot-agents.svg)](https://stackoverflow.com/questions/tagged/fiware+iot)
<br/>
[![Documentation badge](https://img.shields.io/readthedocs/fiware-iotagent-ul.svg)](http://fiware-iotagent-ul.readthedocs.io/en/latest/?badge=latest)
[![Build badge](https://img.shields.io/travis/telefonicaid/iotagent-ul.svg)](https://travis-ci.org/telefonicaid/iotagent-ul/)
[![CI](https://github.com/telefonicaid/iotagent-ul/workflows/CI/badge.svg)](https://github.com/telefonicaid/iotagent-ul/actions?query=workflow%3ACI)
[![Coverage Status](https://coveralls.io/repos/github/telefonicaid/iotagent-ul/badge.svg?branch=master)](https://coveralls.io/github/telefonicaid/iotagent-ul?branch=master)
![Status](https://nexus.lab.fiware.org/static/badges/statuses/iot-ultralight.svg)

Expand Down