Skip to content

Commit

Permalink
testing code coverage logic on ci
Browse files Browse the repository at this point in the history
  • Loading branch information
aldousalvarez committed Apr 30, 2024
1 parent 6be6447 commit 856cb92
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,7 @@ jobs:
${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }}
- run: ./tools/ci.sh

cactus-cmd-api-server:
continue-on-error: false
needs:
Expand Down Expand Up @@ -482,6 +483,7 @@ jobs:
${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }}
- run: ./tools/ci.sh

cactus-core:
continue-on-error: false
env:
Expand All @@ -507,12 +509,15 @@ jobs:
restore-keys: |
${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }}
- run: ./tools/ci.sh

cactus-core-api:
continue-on-error: false
env:
FULL_BUILD_DISABLED: true
JEST_TEST_PATTERN: packages/cactus-core-api/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts
JEST_TEST_RUNNER_DISABLED: false
JEST_TEST_COVERAGE_PATH: ./code-coverage-ts/cactus-core-api
JEST_TEST_CODE_COVERAGE_DISABLED: true
TAPE_TEST_RUNNER_DISABLED: true
needs: build-dev
runs-on: ubuntu-22.04
Expand All @@ -532,6 +537,13 @@ jobs:
restore-keys: |
${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }}
- run: ./tools/ci.sh

- name: Upload coverage reports as artifacts
uses: actions/upload-artifact@v2
with:
name: coverage-reports
path: ./code-coverage-ts/cactus-core-api

cactus-example-carbon-accounting-backend:
continue-on-error: false
env:
Expand All @@ -558,6 +570,7 @@ jobs:
restore-keys: |
${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }}
- run: ./tools/ci.sh

cactus-example-carbon-accounting-business-logic-plugin:
continue-on-error: false
env:
Expand All @@ -583,6 +596,7 @@ jobs:
restore-keys: |
${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }}
- run: ./tools/ci.sh

cactus-example-carbon-accounting-frontend:
continue-on-error: false
env:
Expand Down Expand Up @@ -2313,6 +2327,8 @@ jobs:
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH'


name: Cactus_CI
'on':
pull_request:
Expand Down
2 changes: 2 additions & 0 deletions tools/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ function mainTask()

if [ "${JEST_TEST_RUNNER_DISABLED:-false}" = "true" ]; then
echo "$(date +%FT%T%z) [CI] Jest test runner disabled. Skipping..."
elif [ "${JEST_TEST_CODE_COVERAGE_DISABLED:-false} = 'true"]; then
yarn test:jest:all $JEST_TEST_PATTERN --coverage --coverageDirectory=$JEST_TEST_COVERAGE_PATH
else
yarn test:jest:all $JEST_TEST_PATTERN
fi
Expand Down

0 comments on commit 856cb92

Please sign in to comment.