-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'v6/test-unit' into v6/tests/enable-github-actions
- Loading branch information
Showing
2 changed files
with
666 additions
and
1 deletion.
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,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 |
Oops, something went wrong.