Skip to content

Commit

Permalink
Merge pull request #116 from jason-fox/feature/github-actions
Browse files Browse the repository at this point in the history
Add GitHub Actions, remove travis
  • Loading branch information
apozohue10 committed Dec 22, 2020
2 parents 80480d0 + 3829bdc commit 6d7344a
Show file tree
Hide file tree
Showing 3 changed files with 100 additions and 86 deletions.
99 changes: 99 additions & 0 deletions .github/workflows/ci.yml
@@ -0,0 +1,99 @@
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: extras/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
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: |
docker network create --driver=bridge my-network
docker run -d -h mysql --net=my-network -p 3306:3306 --name mysql -v $(pwd)/test/mysql-data:/docker-entrypoint-initdb.d/:ro -e MYSQL_ROOT_PASSWORD=test mysql:5.7
docker run -d --net=my-network -p 3000:3000 --name keyrock -e IDM_DB_USER=root -e IDM_DB_PASS=test -e DATABASE_HOST=mysql -e IDM_DB_PORT=3306 fiware/idm:7.5.1
npm install
npm test
code-coverage:
name: Coveralls Code Coverage
runs-on: ubuntu-latest
needs: unit-test
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: |
docker network create --driver=bridge my-network
docker run -d -h mysql --net=my-network -p 3306:3306 --name mysql -v $(pwd)/test/mysql-data:/docker-entrypoint-initdb.d/:ro -e MYSQL_ROOT_PASSWORD=test mysql:5.7
docker run -d --net=my-network -p 3000:3000 --name keyrock -e IDM_DB_USER=root -e IDM_DB_PASS=test -e DATABASE_HOST=mysql -e IDM_DB_PORT=3306 fiware/idm:7.5.1
npm install
npm run test:coverage
- name: Push to Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
85 changes: 0 additions & 85 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -6,7 +6,7 @@
[![Support badge](https://img.shields.io/badge/tag-fiware--wilma-orange.svg?logo=stackoverflow)](https://stackoverflow.com/questions/tagged/fiware-wilma)
<br>
[![Documentation badge](https://img.shields.io/readthedocs/fiware-pep-proxy.svg)](https://fiware-pep-proxy.readthedocs.io/en/latest/)
[![Build Status](https://travis-ci.org/ging/fiware-pep-proxy.svg?branch=master)](https://travis-ci.org/ging/fiware-pep-proxy)
[![CI](https://github.com/ging/fiware-pep-proxy/workflows/CI/badge.svg)](https://github.com/ging/fiware-pep-proxy/actions?query=workflow%3ACI)
[![Coverage Status](https://coveralls.io/repos/github/ging/fiware-pep-proxy/badge.svg?branch=master)](https://coveralls.io/github/ging/fiware-pep-proxy?branch=master)
![Status](https://nexus.lab.fiware.org/repository/raw/public/static/badges/statuses/wilma.svg)
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/4417/badge)](https://bestpractices.coreinfrastructure.org/projects/4417)
Expand Down

0 comments on commit 6d7344a

Please sign in to comment.