Skip to content

Commit

Permalink
Merge branch 'v6/test-unit' into v6/tests/enable-github-actions
Browse files Browse the repository at this point in the history
  • Loading branch information
djordjekovac committed Apr 1, 2022
2 parents e86f9cf + f823bdd commit a0f406b
Show file tree
Hide file tree
Showing 2 changed files with 666 additions and 1 deletion.
49 changes: 49 additions & 0 deletions .github/workflows/TEST-unit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: TEST-unit

#todo this test should be execute when opening PR to prerelease/release branches
on: [pull_request]
env:
NODE_ENV: test
ARTIFACTS_DIR: artifacts
CUCUMBER_ARTIFACTS_DIR: artifacts/cucumber
jobs:

test:
#todo think about locking the version - version should be the same as the one in official documentation
runs-on: ubuntu-latest
# services:
# mysql:
# image: mysql:5.7
# env:
# MYSQL_DATABASE: operationaldb
# MYSQL_USER: node
# MYSQL_PASSWORD: password
# MYSQL_ROOT_PASSWORD: password
# ports:
# - 3306:3306
# options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
# graphdb:
# image: khaller/graphdb-free:latest
# ports:
# - 7200:7200
strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: mkdir -p $ARTIFACTS_DIR
- run: cp .origintrail_noderc.tests .origintrail_noderc
- run: sudo chmod -R 777 $ARTIFACTS_DIR
- run: mkdir -p $CUCUMBER_ARTIFACTS_DIR
- run: sudo chmod -R 777 $CUCUMBER_ARTIFACTS_DIR
- run: npm run test:unit;
- uses: actions/upload-artifact@v2
if: ${{ always() }}
with:
name: my-artifact
path: /home/runner/work/ot-node/ot-node/artifacts
Loading

0 comments on commit a0f406b

Please sign in to comment.