Skip to content

Commit

Permalink
ci: implementing new workflow using kash repository
Browse files Browse the repository at this point in the history
  • Loading branch information
tristan-greffe committed Mar 13, 2024
1 parent 786255e commit 11ddaa7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/run_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Run tests
env:
SOPS_AGE_KEY: ${{ secrets.SOPS_AGE_KEY }}
run: bash ./scripts/run_tests.sh -r ${{ github.job }}
run: bash ./scripts/run_tests.sh -c -r ${{ github.job }}

additional_tests:
strategy:
Expand Down
2 changes: 1 addition & 1 deletion scripts/kash
Submodule kash updated 1 files
+2 −5 kash.sh
9 changes: 8 additions & 1 deletion scripts/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ ROOT_DIR=$(dirname "$THIS_DIR")

NODE_VER=16
CI_STEP_NAME="Run tests"
CODE_COVERAGE=false
while getopts "n:r:c:" option; do
case $option in
n) # defines node version
Expand All @@ -23,7 +24,7 @@ while getopts "n:r:c:" option; do
trap 'slack_ci_report "$ROOT_DIR" "$CI_STEP_NAME" "$?" "$SLACK_WEBHOOK_LIBS"' EXIT
;;
c) # publish code coverage
trap 'send_coverage_to_cc "$CC_TEST_REPORTER_ID" "$?"' EXIT
CODE_COVERAGE=true
;;
*)
;;
Expand All @@ -49,3 +50,9 @@ load_env_files "$WORKSPACE_DIR/development/common/SLACK_WEBHOOK_LIBS.enc.env"

use_node "$NODE_VER"
yarn && yarn test

## Publish code coverage
##
if [ -n "$CODE_COVERAGE" ]; then
send_coverage_to_cc "$CC_TEST_REPORTER_ID"
fi

0 comments on commit 11ddaa7

Please sign in to comment.