Skip to content

Commit

Permalink
ci: create GH action CI workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
getlarge committed Feb 14, 2022
1 parent 9afd7d5 commit b46e651
Showing 1 changed file with 66 additions and 0 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: BigChainDB wallet CI

on:
push:
paths-ignore:
- 'README.md'
- '**/package-lock.json'
branches:
- main
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
paths-ignore:
- 'README.md'
- '**/package-lock.json'
branches:
- main

jobs:
setup-and-test:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
timeout-minutes: 10

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

steps:
- name: Check out repository code
uses: actions/checkout@v2

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

- name: Cache Node.js modules
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-node-
${{ runner.OS }}-
- name: Install dependencies
run: npm run bootstrap

- name: Build packages
run: npm run build

- name: Run Jest tests
run: npm run test:cov
env:
CI: true

- name: Upload coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: ./coverage
retention-days: 2

0 comments on commit b46e651

Please sign in to comment.