Skip to content

Commit

Permalink
chore(ci): moves ci from travis to gh actions
Browse files Browse the repository at this point in the history
  • Loading branch information
sverweij committed Dec 27, 2020
1 parent f773e81 commit 9bebcf9
Show file tree
Hide file tree
Showing 5 changed files with 82 additions and 52 deletions.
20 changes: 0 additions & 20 deletions .github/stale.yml

This file was deleted.

62 changes: 62 additions & 0 deletions .github/workflows/lint-test-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: linting & test coverage - linux

on:
push:
branches:
- master
- develop
pull_request:

jobs:
check:
strategy:
fail-fast: true
matrix:
node-version:
- 14.x
platform:
- ubuntu-latest

runs-on: ${{matrix.platform}}

steps:
- name: checkout
uses: actions/checkout@v1
- name: cache node modules for ${{matrix.node-version}}@${{matrix.platform}}
uses: actions/cache@v1
with:
path: node_modules
key: ${{matrix.node-version}}@${{matrix.platform}}-build-${{hashFiles('package.json')}}
restore-keys: |
${{matrix.node-version}}@${{matrix.platform}}-build-
- name: set up node ${{matrix.node-version}}@${{matrix.platform}}
uses: actions/setup-node@v1
with:
node-version: ${{matrix.node-version}}
- name: install & build
run: |
node --version
npm install
npm run build
shell: bash
env:
CI: true
- name: lint & forbidden dependency check
run: |
node --version
npm run lint
npm run depcruise
shell: bash
env:
CI: true
- name: test coverage
run: |
node --version
npm run test:cover
shell: bash
env:
CI: true
- name: report coverage to code climate
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: ${{ secrets.CODE_CLIMATE_TEST_COVERAGE_ID }}
17 changes: 17 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: "Mark or close stale issues"
on:
schedule:
- cron: "43 2 * * 2"

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 14
days-before-close: 3
stale-issue-message: "This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs."
stale-issue-label: "stale"
exempt-issue-labels: "bug,security,enhancement,good first issue,needs_fix_upstream,PR welcome,question"
29 changes: 0 additions & 29 deletions .travis.yml

This file was deleted.

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# mscgen_js
*Turns text into sequence charts.*

[![Build Status](https://travis-ci.org/sverweij/mscgen_js.svg?branch=master)][travis.mscgenjs]
[![Build Status](https://github.com/sverweij/mscgen_js/workflows/linting%20&%20test%20coverage%20-%20linux/badge.svg)][github.actions]
[![Code Climate](https://codeclimate.com/github/sverweij/mscgen_js/badges/gpa.svg)][codeclimate.mscgenjs]
[![Test Coverage](https://codeclimate.com/github/sverweij/mscgen_js/badges/coverage.svg)](https://codeclimate.com/github/sverweij/mscgen_js/coverage)
[![Dependency Status](https://david-dm.org/sverweij/mscgen_js.svg)](https://david-dm.org/sverweij/mscgen_js)
Expand Down Expand Up @@ -139,7 +139,7 @@ At the time the font was created it was licensed [GPLv3][license.gpl-3.0] or
It uses [mocha][21], [chai][39],
[istanbul][28], [eslint][22] and [dependency-cruiser][41] to
maintain some modicum of verifiable code quality.
You can see the build history in [Travis][travis.mscgenjs] and an indication
You can see the build history in [GitHub actions][github.actions] and an indication
of the shape of the code at [Code Climate ][codeclimate.mscgenjs].

## Thanks
Expand All @@ -166,6 +166,7 @@ of the shape of the code at [Code Climate ][codeclimate.mscgenjs].
[codemirror.license]: wikum/licenses/license.codemirror.md
[commander.license]: wikum/licenses/license.commander.md
[favicon]: https://github.com/audreyr/favicon-cheat-sheet
[github.actions]: https://github.com/sverweij/mscgen_js/actions?query=workflow%3A%22linting+%26+test+coverage+-+linux%22
[icomoon]: https://icomoon.io/app/
[jsdom]: https://github.com/tmpvar/jsdom
[jsdom.author]: http://tmpvar.com/
Expand Down Expand Up @@ -195,7 +196,6 @@ of the shape of the code at [Code Climate ][codeclimate.mscgenjs].
[pegjs.license]: wikum/licenses/license.pegjs.md
[phantomjs]: https://www.npmjs.com/package/phantomjs
[requirejs.license]: wikum/licenses/license.requirejs.md
[travis.mscgenjs]: https://travis-ci.org/sverweij/mscgen_js
[15]: wikum/licenses/license.icons.md
[21]: wikum/licenses/license.mocha.md
[22]: wikum/licenses/license.eslint.md
Expand Down

0 comments on commit 9bebcf9

Please sign in to comment.