Merge pull request #68 from bcgsc/task/KBDEV-1128-testing-orientjs-v3… #211
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
name: build | |
on: | |
- push | |
- workflow_dispatch | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node: [16, 18, 20] | |
orientdb: ['3.0', '3.1', '3.2.13'] | |
name: orientdb-${{ matrix.orientdb }} node-${{ matrix.node }} | |
services: | |
orientdb: | |
image: orientdb:${{ matrix.orientdb }} | |
ports: | |
- 2424:2424 | |
- 2480:2480 | |
env: | |
ORIENTDB_ROOT_PASSWORD: root | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node }} | |
- run: yes | ssh-keygen -t rsa -b 4096 -f id_rsa -N '' | |
- run: npm ci | |
- run: npm run lint -- --quiet # errors only, no warnings | |
name: eslint | |
- run: npm audit --production --audit-level high | |
if: ${{ github.base_ref == 'master' }} | |
- run: npm run test | |
env: | |
GKB_DB_HOST: localhost | |
GKB_DBS_PASS: root # default password for new db | |
GKB_LOG_LEVEL: ERROR | |
- uses: EnricoMi/publish-unit-test-result-action@v1.6 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
files: coverage/junit.xml | |
if: matrix.node == 16 && matrix.orientdb == '3.0' | |
- uses: codecov/codecov-action@v1 | |
with: | |
yml: codecov.yml | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_if_ci_error: true | |
if: matrix.node == 16 && matrix.orientdb == '3.0' | |
docker: | |
runs-on: ubuntu-latest | |
name: docker build | |
steps: | |
- uses: actions/checkout@v2 | |
- name: build the API docker container | |
run: | | |
docker build --file Dockerfile --tag pori/graphkb-api . |