-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from hirosystems/develop
release to master
- Loading branch information
Showing
27 changed files
with
8,241 additions
and
11,010 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
node_modules/ | ||
dist/ | ||
.eslintrc.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- develop | ||
tags-ignore: | ||
- '**' | ||
paths-ignore: | ||
- '**/CHANGELOG.md' | ||
- '**/package.json' | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version-file: '.nvmrc' | ||
|
||
- name: Cache node modules | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: cache-node-modules | ||
with: | ||
path: | | ||
~/.npm | ||
**/node_modules | ||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-build-${{ env.cache-name }}- | ||
${{ runner.os }}-build- | ||
${{ runner.os }}- | ||
- name: Install deps | ||
run: npm ci --audit=false | ||
|
||
- name: Lint ESLint | ||
run: npm run lint:eslint | ||
|
||
- name: Lint Prettier | ||
run: npm run lint:prettier | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
env: | ||
PGHOST: 127.0.0.1 | ||
PGPORT: 5432 | ||
PGUSER: postgres | ||
PGPASSWORD: postgres | ||
PGDATABASE: postgres | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version-file: '.nvmrc' | ||
|
||
- name: Cache node modules | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: cache-node-modules | ||
with: | ||
path: | | ||
~/.npm | ||
**/node_modules | ||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-build-${{ env.cache-name }}- | ||
${{ runner.os }}-build- | ||
${{ runner.os }}- | ||
- name: Install deps | ||
run: npm ci --audit=false | ||
|
||
- name: Setup integration environment | ||
run: | | ||
sudo ufw disable | ||
npm run testenv:run -- -d | ||
npm run testenv:logs -- --no-color &> docker-compose-logs.txt & | ||
- name: Run tests | ||
run: npm run test -- --coverage | ||
|
||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v3 | ||
|
||
- name: Print integration environment logs | ||
run: cat docker-compose-logs.txt | ||
if: failure() | ||
|
||
- name: Teardown integration environment | ||
run: npm run testenv:stop | ||
if: always() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "node", | ||
"request": "launch", | ||
"name": "Jest", | ||
"program": "${workspaceFolder}/node_modules/jest/bin/jest", | ||
"args": [ | ||
"--testTimeout=3600000", | ||
"--runInBand", | ||
"--no-cache", | ||
], | ||
"outputCapture": "std", | ||
"console": "integratedTerminal", | ||
"preLaunchTask": "npm: testenv:run", | ||
"postDebugTask": "npm: testenv:stop", | ||
"env": { | ||
"PGHOST": "localhost", | ||
"PGDATABASE": "postgres", | ||
"PGUSER": "postgres", | ||
"PGPASSWORD": "postgres", | ||
}, | ||
}, | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "npm: testenv:run", | ||
"type": "shell", | ||
"command": "npm run testenv:run -- -d", | ||
"isBackground": true, | ||
"problemMatcher": { | ||
"pattern": { | ||
"regexp": ".", | ||
"file": 1, | ||
"location": 2, | ||
"message": 3 | ||
}, | ||
"background": { | ||
"activeOnStart": true, | ||
"beginsPattern": ".", | ||
"endsPattern": "." | ||
} | ||
} | ||
}, | ||
{ | ||
"label": "npm: testenv:stop", | ||
"type": "shell", | ||
"command": "npm run testenv:stop", | ||
"presentation": { | ||
"echo": true, | ||
"reveal": "silent", | ||
"focus": false, | ||
"panel": "shared", | ||
"showReuseMessage": true, | ||
"clear": false | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
version: '3.7' | ||
services: | ||
postgres: | ||
image: "postgres:15" | ||
ports: | ||
- "5432:5432" | ||
environment: | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: postgres | ||
POSTGRES_DB: postgres | ||
POSTGRES_PORT: 5432 |
Oops, something went wrong.