Skip to content

Commit

Permalink
🥭 update build setup
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfram77 committed Sep 17, 2022
1 parent 5ead4d7 commit 1fcfad7
Show file tree
Hide file tree
Showing 10 changed files with 750 additions and 1,725 deletions.
78 changes: 78 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: CI
on:
push:
branches:
- main
- master
tags:
- '!*' # Do not execute on tags
env:
GITHUB_TOKEN: ${{secrets.GH_TOKEN}}
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}
FORCE_COLOR: 1


jobs:
test:
strategy:
matrix:
platform: [ubuntu-latest, windows-latest, macOS-latest]
node: [16.x, 18.x]
name: Test with Node ${{matrix.node}} on ${{matrix.platform}}
runs-on: ${{matrix.platform}}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
with:
node-version: ${{matrix.node}}
- run: npm ci
- run: npm test


# coverage:
# name: Publish coverage
# needs: [test]
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-node@v2
# with:
# node-version: 18.x
# - run: npm ci
# - run: npm test
# - uses: paambaati/[email protected]
# - uses: coverallsapp/github-action@master
# with:
# github-token: ${{secrets.GITHUB_TOKEN}}


docs:
name: Publish docs
needs: [test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
with:
node-version: 18.x
- run: git clone https://${GITHUB_TOKEN}@github.com/ifct2017/deploy "$HOME/deploy"
- run: bash "$HOME/deploy/setup.sh"
- run: npm i -g typescript typedoc
- run: npm ci
- run: npm run publish-docs


packages:
name: Publish packages
needs: [test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
with:
node-version: 18.x
- run: git clone https://${GITHUB_TOKEN}@github.com/ifct2017/deploy "$HOME/deploy"
- run: bash "$HOME/deploy/setup.sh"
- run: npm i -g typescript rollup typedoc browserify terser
- run: npm ci
- run: npm run publish-packages
21 changes: 21 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: PR
on: [pull_request]
env:
FORCE_COLOR: 1


jobs:
test:
strategy:
matrix:
platform: [ubuntu-latest, windows-latest, macOS-latest]
node: [16.x, 18.x]
name: Test with Node ${{ matrix.node }} on ${{ matrix.platform }}
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- run: npm ci
- run: npm test
8 changes: 6 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## Output
## ------
# Generated files
.build/
.docs/
coverage/
*.map
example.js
corpus.js


Expand Down
28 changes: 23 additions & 5 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,27 @@
# Data
assets/
configs/
index.txt
# Source only
.gitmodules
.github/
.docs/
src/
data/
wiki/
tests/
unused/
test.js
CITATION.cff
TODO

# Build
.build/
coverage/
.travis.yml
.coveralls.yml
tsconfig.json
jest.config.js
rollup.config.js
build.js
tests.js

# Data
assets/
configs/
index.txt
9 changes: 0 additions & 9 deletions .travis.yml

This file was deleted.

Loading

0 comments on commit 1fcfad7

Please sign in to comment.