Skip to content

Commit

Permalink
Setup GitHub actions
Browse files Browse the repository at this point in the history
  • Loading branch information
andywhite37 committed Dec 12, 2019
1 parent f66696f commit 289cd83
Show file tree
Hide file tree
Showing 6 changed files with 78 additions and 25 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: CI

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [12.x]

steps:
- name: Checkout
uses: actions/checkout@v1

- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

# TODO: not sure if this actually does anything useful
- name: Cache ~/.npm
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
- name: npm install
run: npm install

- name: npm run cleancoverage
run: npm run cleancoverage

- name: Coveralls
uses: coverallsapp/github-action@master
with:
path-to-lcov: ./docs/coverage/lcov.info
github-token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ npm-debug.log
*.orig

# Generated project files
/coverage
/docs/coverage
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Relude CSV

[![GitHub CI](https://img.shields.io/github/workflow/status/reazen/relude-csv/CI/master)](https://github.com/reazen/relude-csv/actions)
[![npm](https://img.shields.io/npm/v/relude-csv.svg)](https://www.npmjs.com/package/relude-csv)
[![Coveralls](https://img.shields.io/coveralls/github/reazen/relude-csv.svg)](https://coveralls.io/github/reazen/relude-csv)

Parse strings of CSV data into a structured `list(list(string))`, using the parsing tools in [Relude Parse](https://github.com/reazen/relude-parse).

## Features
Expand Down
7 changes: 7 additions & 0 deletions default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
with import <nixpkgs> {};
mkShell {
buildInputs = [ nodejs-10_x ] ++ (with ocamlPackages_4_02; [ ocaml ninja merlin ]);
shellHook = ''
export PATH="`pwd`/node_modules/.bin:$PATH"
'';
}
24 changes: 12 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 13 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
"description": "Parse CSV strings in ReasonML",
"main": "index.js",
"scripts": {
"build": "bsb -make-world",
"clean": "bsb -clean-world",
"cleanbuild": "npm run clean && npm run build",
"test": "jest --coverage",
"cleantest": "npm run clean && npm run build && npm run test",
"coveralls": "cat ./coverage/lcov.info | coveralls || true",
"build": "bsb -make-world",
"watch": "bsb -make-world -w",
"test": "jest",
"coverage": "jest --coverage --coverage-reporters=lcov --coverage-reporters=text --coverage-directory ./docs/coverage",
"cleanbuild": "npm run clean && npm run build",
"cleantest": "npm run cleanbuild && npm run test",
"cleancoverage": "npm run cleanbuild && npm run coverage",
"start": "npm run watch"
},
"repository": {
Expand All @@ -31,16 +32,16 @@
},
"homepage": "https://github.com/reazen/relude-csv#readme",
"peerDependencies": {
"bs-abstract": "^0.17.0",
"relude": "^0.27.0",
"relude-parse": "^0.6.0"
"bs-abstract": "^0.18.0",
"relude": "^0.41.0",
"relude-parse": "^0.7.0"
},
"devDependencies": {
"@glennsl/bs-jest": "^0.4.9",
"bs-abstract": "^0.17.0",
"bs-platform": "^5.0.6",
"relude": "^0.27.0",
"relude-parse": "^0.6.0"
"bs-abstract": "^0.18.0",
"bs-platform": "^7.0.1",
"relude": "^0.41.0",
"relude-parse": "^0.7.0"
},
"jest": {
"coveragePathIgnorePatterns": [
Expand Down

0 comments on commit 289cd83

Please sign in to comment.