1
0
mirror of https://github.com/bigchaindb/js-bigchaindb-driver.git synced 2024-06-17 18:13:21 +02:00
js-bigchaindb-driver/.github/workflows/ci.yml

69 lines
1.4 KiB
YAML
Raw Normal View History

2022-02-16 07:56:28 +01:00
name: CI
on:
push:
branches:
2022-02-16 07:57:31 +01:00
- master
2022-02-16 07:56:28 +01:00
paths-ignore:
- README.md
- API.md
- docs/*.rst
pull_request:
branches:
2022-02-16 07:57:31 +01:00
- master
2022-02-16 07:56:28 +01:00
types:
- ready_for_review
- opened
- reopened
- synchronize
paths-ignore:
- README.md
- API.md
- docs/*.rst
jobs:
test:
runs-on: ubuntu-latest
if: github.event_name == 'release' || github.event_name == 'push' || !github.event.pull_request.draft
timeout-minutes: 10
steps:
- name: Checkout the commit
uses: actions/checkout@v2
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: 14
- name: Cache dependencies
id: cache
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
2022-02-16 08:05:51 +01:00
- name: Run BigChainDB node
run: |
echo Building and starting up docker containers
docker-compose -f ./docker-compose.yml up -d
2022-02-16 07:56:28 +01:00
- name: Install dependencies
env:
HUSKY_SKIP_INSTALL: 'true'
run: npm install
- name: Lint
run: npm run lint
- name: Build
run: npm run build
2022-02-16 08:05:51 +01:00
# ensure BCDB node is up and running
2022-02-16 08:17:44 +01:00
- run: sleep 20
2022-02-16 07:56:28 +01:00
- name: Test
run: npm run test