Skip to content

Commit

Permalink
Move CI to GitHub Actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
RubenVerborgh committed Jan 4, 2021
1 parent e25e52a commit 521324d
Show file tree
Hide file tree
Showing 6 changed files with 113 additions and 68 deletions.
84 changes: 84 additions & 0 deletions .github/workflows/ci.yml
@@ -0,0 +1,84 @@
name: CI

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

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
- 8.x
- 10.x
- 12.x
- 14.x
- 15.x
steps:
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- uses: actions/checkout@v2
- run: npm ci --ignore-scripts
- run: npm run build
- run: npm run lint
- run: npm run test
- run: npm run spec-turtle
- run: npm run spec-ntriples
- run: npm run spec-nquads
- run: npm run spec-trig
- run: npx nyc report --reporter=text-lcov > lcov.info
- uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
flag-name: run-${{ matrix.node-version }}
parallel: true
path-to-lcov: lcov.info

coveralls:
needs: test
runs-on: ubuntu-latest
steps:
- name: Consolidate test coverage from different jobs
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true

docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14.x
- run: npm ci --ignore-scripts
- run: npm run docs
- uses: actions/upload-artifact@v2
with:
name: docs
path: |
index.html
docs
retention-days: 1

gh-pages:
needs:
- docs
- test
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/download-artifact@v2
with:
name: docs
- uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: .
7 changes: 7 additions & 0 deletions .nycrc
@@ -0,0 +1,7 @@
{
"check-coverage": true,
"branches": 100,
"functions": 100,
"lines": 100,
"statements": 100
}
41 changes: 0 additions & 41 deletions .travis.yml

This file was deleted.

26 changes: 0 additions & 26 deletions .travis_build_pages

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
@@ -1,5 +1,5 @@
# Lightning fast, asynchronous, streaming RDF for JavaScript
[![Build Status](https://api.travis-ci.com/rdfjs/N3.js.svg?branch=master)](https://api.travis-ci.com/rdfjs/N3.js.svg?branch=master)
[![Build Status](https://github.com/rdfjs/N3.js/workflows/CI/badge.svg)](https://github.com/rdfjs/N3.js/actions)
[![Coverage Status](https://coveralls.io/repos/github/rdfjs/N3.js/badge.svg)](https://coveralls.io/github/rdfjs/N3.js)
[![npm version](https://badge.fury.io/js/n3.svg)](https://www.npmjs.com/package/n3)
[![DOI](https://zenodo.org/badge/3058202.svg)](https://zenodo.org/badge/latestdoi/3058202)
Expand Down
21 changes: 21 additions & 0 deletions index.html
@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html>
<head>
<title>N3.js Documentation</title>
<meta charset=utf-8>
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" media="all" href="docs/docco.css" />
</head>
<body style="margin: 2em;">
<h1>N3.js Documentation</h1>
<ul>
<li><a href="docs/N3Lexer.html">N3Lexer</a></li>
<li><a href="docs/N3Parser.html">N3Parser</a></li>
<li><a href="docs/N3Store.html">N3Store</a></li>
<li><a href="docs/N3StreamParser.html">N3StreamParser</a></li>
<li><a href="docs/N3StreamWriter.html">N3StreamWriter</a></li>
<li><a href="docs/N3Util.html">N3Util</a></li>
<li><a href="docs/N3Writer.html">N3Writer</a></li>
</ul>
</body>
</html>

0 comments on commit 521324d

Please sign in to comment.