-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathunit.sh
More file actions
executable file
·49 lines (38 loc) · 1.94 KB
/
unit.sh
File metadata and controls
executable file
·49 lines (38 loc) · 1.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/bash
set -euo pipefail
cd "$(git rev-parse --show-toplevel)"
# This file is for you! Edit it to call your unit test suite. Note that the same
# file will be called if you run it locally as if you run it on CI.
# Replace the following line with something like:
#
# rails test:unit
# python manage.py test
# npm run test
#
# or whatever is appropriate to your project. You should *only* run your fast
# tests from here. If you want to run other test suites, see the predefined
# tasks in scripts/test.mk.
# run tests
# Python projects - asyncapigenerator
echo "Setting up and running asyncapigenerator tests..."
make -C ./src/asyncapigenerator install-dev
make -C ./src/asyncapigenerator coverage # Run with coverage to generate coverage.xml for SonarCloud
# Python projects - cloudeventjekylldocs
echo "Setting up and running cloudeventjekylldocs tests..."
make -C ./src/cloudeventjekylldocs install-dev
make -C ./src/cloudeventjekylldocs coverage # Run with coverage to generate coverage.xml for SonarCloud
# Python projects - eventcatalogasyncapiimporter
echo "Setting up and running eventcatalogasyncapiimporter tests..."
make -C ./src/eventcatalogasyncapiimporter install-dev
make -C ./src/eventcatalogasyncapiimporter coverage # Run with coverage to generate coverage.xml for SonarCloud
# Python projects - python-schema-generator
echo "Setting up and running python-schema-generator tests..."
make -C ./src/python-schema-generator install-dev
make -C ./src/python-schema-generator coverage # Run with coverage to generate coverage.xml for SonarCloud
# TypeScript/JavaScript projects (npm workspace)
# Note: src/cloudevents is included in workspaces, so it will be tested here
npm ci
npm run test:unit --workspaces
# merge coverage reports
mkdir -p .reports
TMPDIR="./.reports" ./node_modules/.bin/lcov-result-merger "**/.reports/unit/coverage/lcov.info" ".reports/lcov.info" --ignore "node_modules" --prepend-source-files --prepend-path-fix "../../.."