Skip to content

Commit

Permalink
change path
Browse files Browse the repository at this point in the history
  • Loading branch information
chinelo-obitube authored and chinelo-obitube committed Jul 20, 2024
1 parent 8ada0b8 commit 74540e2
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 19 deletions.
19 changes: 6 additions & 13 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ on:
- cron: '0 5 * * *' #Runs daily at 5 AM UTC
push:
branches:
- master
- develop
pull_request:
branches:
- develop
- CV2-4794-migrate-travis-ci
# - master
# - develop
# pull_request:
# branches:
# - develop

env:
CC_TEST_REPORTER_ID: "${{ secrets.CC_TEST_REPORTER_ID }}"
Expand Down Expand Up @@ -281,12 +282,4 @@ jobs:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
run: |
docker-compose exec -T -e GIT_BRANCH=$GIT_BRANCH \
-e GITHUB_PULL_REQUEST=$GITHUB_PULL_REQUEST \
-e GITHUB_TEST_RESULT=$GITHUB_TEST_RESULT \
-e GITHUB_REPO_SLUG=$GITHUB_REPO_SLUG \
-e GITHUB_BUILD_NUMBER=$ GITHUB_BUILD_NUMBER \
-e GIT_COMMIT_SHA=$GITHUB_COMMIT_SHA \
-e CC_TEST_REPORTER_ID=$CC_TEST_REPORTER_ID \
-e GITHUB_JOB_NAME=$GITHUB_JOB_NAME \
-e AWS_CONFIG_FILE=/app/credentials \
api test/test-coverage.sh
2 changes: 2 additions & 0 deletions test/cc-test-reporter
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
go run /tmp/go/src/github.com/codeclimate/test-reporter/main.go $@
6 changes: 3 additions & 3 deletions test/format-coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

apt-get install -y awscli

# if [ "$GITHUB_PULL_REQUEST" == "false" ]
# then
if [ "$GITHUB_PULL_REQUEST" == "false" ]
then
./test/cc-test-reporter format-coverage -t simplecov --output ../coverage/codeclimate.$GITHUB_JOB_NAME.json ../coverage/.resultset.json
aws s3 cp ../coverage/codeclimate.$GITHUB_JOB_NAME.json s3://check-api-travis/codeclimate/$GITHUB_REPO_SLUG/$GITHUB_BUILD_NUMBER/codeclimate.$GITHUB_JOB_NAME.json
# fi
fi
6 changes: 3 additions & 3 deletions test/sum-upload-coverage.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

# if [[ "$GITHUB_PULL_REQUEST" == "false" ]] && [[ $GITHUB_TEST_RESULT == 0 ]]
# then
if [[ "$GITHUB_PULL_REQUEST" == "false" ]] && [[ $GITHUB_TEST_RESULT == 0 ]]
then
rm -rf ../coverage/*
aws s3 cp --recursive s3://check-api-travis/codeclimate/$GITHUB_REPO_SLUG/$GITHUB_BUILD_NUMBER/ ../coverage
if [[ $(ls ../coverage/codeclimate.* | wc -l) -eq 3 ]]
Expand All @@ -19,4 +19,4 @@
cat ../coverage/codeclimate.json | ./cc-test-reporter upload-coverage --input -
./cc-test-reporter show-coverage ../coverage/codeclimate.json
fi
# fi
fi

0 comments on commit 74540e2

Please sign in to comment.