🐛 #23 Fix throw error when file doesn't exist

* #23 Fix throw error when file doesn't exist
Run all the tests in once without special runner
Add positive scenario
Move coverage to the backend build workflow
This commit is contained in:
Anton Shepilov
2023-05-01 19:45:28 +02:00
committed by GitHub
parent 11c0c35eb2
commit fd03040d73
15 changed files with 121 additions and 82 deletions
+9 -6
View File
@@ -19,12 +19,15 @@ jobs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: build-test
run: cd tdrive && docker-compose -f docker-compose.tests.yml run -e NODE_OPTIONS=--unhandled-rejections=warn node npm run build
- name: unit-test
run: cd tdrive && docker-compose -f docker-compose.tests.yml run -e NODE_OPTIONS=--unhandled-rejections=warn node npm run test:unit
- name: e2e-mongo-test
run: cd tdrive && docker-compose -f docker-compose.tests.yml run -e NODE_OPTIONS=--unhandled-rejections=warn -e SEARCH_DRIVER=mongodb -e DB_DRIVER=mongodb -e PUBSUB_TYPE=local node npm run test:e2e
run: cd tdrive && docker-compose -f docker-compose.tests.yml run -e NODE_OPTIONS=--unhandled-rejections=warn -e SEARCH_DRIVER=mongodb -e DB_DRIVER=mongodb -e PUBSUB_TYPE=local node npm run test:all
- name: e2e-cassandra-test
run: cd tdrive && docker-compose -f docker-compose.tests.yml up -d scylladb elasticsearch rabbitmq && sleep 60 && docker-compose -f docker-compose.tests.yml run -e NODE_OPTIONS=--unhandled-rejections=warn -e SEARCH_DRIVER=elasticsearch -e DB_DRIVER=cassandra node npm run test:e2e
run: cd tdrive && docker-compose -f docker-compose.tests.yml up -d scylladb elasticsearch rabbitmq && sleep 60 && docker-compose -f docker-compose.tests.yml run -e NODE_OPTIONS=--unhandled-rejections=warn -e SEARCH_DRIVER=elasticsearch -e DB_DRIVER=cassandra node npm run test:all
- name: coverage
uses: adRise/jest-cov-reporter@main
with:
branch-coverage-report-path: ./tdrive/coverage/coverage-summary.json
base-coverage-report-path: ./tdrive/coverage/coverage-summary.json
delta: 0.3
fullCoverageDiff: true
-32
View File
@@ -1,32 +0,0 @@
name: backend-coverage
on:
pull_request_target:
types: [assigned, opened, synchronize, reopened]
branches: [main]
paths:
- "tdrive/backend/node/**"
jobs:
test:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
ref: "refs/pull/${{ github.event.number }}/merge"
- name: unit-test
run: cd tdrive && docker-compose -f docker-compose.tests.yml run -e NODE_OPTIONS=--unhandled-rejections=warn node npm run test:unit
- name: e2e-mongo-test
run: cd tdrive && docker-compose -f docker-compose.tests.yml run -e NODE_OPTIONS=--unhandled-rejections=warn -e SEARCH_DRIVER=mongodb -e DB_DRIVER=mongodb -e PUBSUB_TYPE=local node npm run test:e2e
- name: generate coverage summary json
run: cd tdrive && docker-compose -f docker-compose.tests.yml run -e NODE_OPTIONS=--unhandled-rejections=warn node npm run test:merge:json
- name: generate coverage summary text
run: cd tdrive && docker-compose -f docker-compose.tests.yml run -e NODE_OPTIONS=--unhandled-rejections=warn node npm run test:merge:text
- name: Coverage
uses: adRise/jest-cov-reporter@main
with:
branch-coverage-report-path: ./tdrive/coverage/merged/coverage-summary.json
base-coverage-report-path: ./tdrive/coverage/merged/coverage-summary.json
delta: 0.3
fullCoverageDiff: true