diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..af49ad5c --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,26 @@ +name: Node.js CI + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [20.x] + + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm install + - run: npm test diff --git a/.gitignore b/.gitignore index 6e64a7af..d6cba1a2 100644 --- a/.gitignore +++ b/.gitignore @@ -50,3 +50,4 @@ Session.vim .idea .testdata-* +.vscode/ diff --git a/README.md b/README.md index 26da10d1..d5e3368f 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Obyte core library (Ocore) +![Node.js CI](https://github.com/AdekunleBamz/ocore/actions/workflows/ci.yml/badge.svg) + This is a library used in [Obyte](https://obyte.org) clients. Some of the clients that require the library: * [GUI wallet](https://github.com/byteball/obyte-gui-wallet) - GUI wallet for Mac, Windows, Linux, iOS, and Android. diff --git a/package.json b/package.json index a351afe9..d78d3775 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "ws": "^8.18.1" }, "scripts": { - "test": "yarn ava --timeout=60s --concurrency=1 --fail-fast --verbose", + "test": "ava --timeout=60s --concurrency=1 --fail-fast --verbose", "compileGrammar:oscript": "nearleyc ./formula/grammars/oscript.ne -o ./formula/grammars/oscript.js", "compileGrammar:ojson": "nearleyc ./formula/grammars/ojson.ne -o ./formula/grammars/ojson.js" },