-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add benchmarker, run on github actions
- Loading branch information
alxndrsn
committed
Oct 5, 2022
1 parent
851f30f
commit 548eebc
Showing
9 changed files
with
3,224 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Node.js CI | ||
|
||
on: push | ||
|
||
jobs: | ||
benchmark: | ||
# TODO should we use the same container as circle & central? | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [16.17.0] | ||
services: | ||
# see: https://docs.github.com/en/enterprise-server@3.5/actions/using-containerized-services/creating-postgresql-service-containers | ||
postgres: | ||
image: postgres:9.6 | ||
env: | ||
POSTGRES_PASSWORD: odktest | ||
ports: | ||
- 5432:5432 | ||
# Set health checks to wait until postgres has started | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'npm' | ||
- run: npm ci | ||
- run: node lib/bin/create-docker-databases.js | ||
- name: Benchmark | ||
timeout-minutes: 10 | ||
run: ./benchmarker/scripts/ci-benchmark | ||
- name: Backend Logs | ||
if: always() | ||
run: "! [[ -f ./backend.log ]] || cat ./backend.log" |
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,29 @@ | ||
module.exports = { | ||
env: { | ||
commonjs: true, | ||
es2021: true, | ||
node: true, | ||
}, | ||
extends: 'eslint:recommended', | ||
parserOptions: { | ||
ecmaVersion: "latest", | ||
}, | ||
rules: { | ||
'indent': 'off', | ||
'key-spacing': 'off', | ||
'keyword-spacing': 'off', | ||
'no-console': 'off', | ||
'no-mixed-operators': 'off', | ||
'no-multi-spaces': 'off', | ||
'no-plusplus': 'off', | ||
'no-return-assign': 'off', | ||
'no-shadow': 'off', | ||
'no-undef-init': 'error', | ||
'no-unused-expressions': 'error', | ||
'no-use-before-define': [ 'error', { functions:false } ], | ||
'semi': [ 'error', 'always' ], | ||
'semi-style': 'off', | ||
'space-in-parens': 'off', | ||
'switch-colon-spacing': 'off', | ||
}, | ||
}; |
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,2 @@ | ||
/node_modules/ | ||
/logs/ |
Oops, something went wrong.