diff --git a/.github/workflows/integrations-ci.yml b/.github/workflows/integrations-ci.yml index e899b68e..3120b502 100644 --- a/.github/workflows/integrations-ci.yml +++ b/.github/workflows/integrations-ci.yml @@ -28,3 +28,17 @@ jobs: - name: Run tests with code coverage run: COVERAGE=true bundle exec rspec working-directory: ./integrations + + - name: Install Code Climate Test Reporter + run: | + curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./integrations/cc-test-reporter + chmod +x ./integrations/cc-test-reporter + working-directory: ./integrations + + - name: Push coverage data to Code Climate + env: + CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} + run: | + ./integrations/cc-test-reporter before-build + ./integrations/cc-test-reporter after-build --exit-code $? + working-directory: ./integrations diff --git a/.github/workflows/server-ci.yml b/.github/workflows/server-ci.yml index 393f3c03..762c587b 100644 --- a/.github/workflows/server-ci.yml +++ b/.github/workflows/server-ci.yml @@ -54,3 +54,17 @@ jobs: - name: Run Tests run: bundle exec rspec working-directory: ./server + + - name: Install cc-test-reporter + if: github.event_name == 'push' + run: | + curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./server/cc-test-reporter + chmod +x ./server/cc-test-reporter + working-directory: ./server + + - name: Upload Coverage to Code Climate + if: github.event_name == 'push' + run: | + ./server/cc-test-reporter before-build + ./server/cc-test-reporter after-build --exit-code $? + working-directory: ./server diff --git a/.github/workflows/server-docker-build.yml b/.github/workflows/server-docker-build.yml index 319d83e3..4503d05c 100644 --- a/.github/workflows/server-docker-build.yml +++ b/.github/workflows/server-docker-build.yml @@ -9,7 +9,7 @@ on: env: IMAGE_NAME: multiwoven/multiwoven-server - IMAGE_TAG: latest-main + IMAGE_TAG: edge jobs: build_and_push: diff --git a/.github/workflows/ui-ci.yml b/.github/workflows/ui-ci.yml index acdc231c..2d95bfe2 100644 --- a/.github/workflows/ui-ci.yml +++ b/.github/workflows/ui-ci.yml @@ -1,6 +1,10 @@ name: frontend-ci on: + push: + branches: [main] + paths: + - "ui/**" pull_request: paths: - "ui/**" @@ -24,3 +28,17 @@ jobs: - name: Run tests and collect coverage run: npm test -- --coverage working-directory: ./ui + + - name: Upload coverage to Code Climate + env: + CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} + run: | + curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./ui/cc-test-reporter + chmod +x ./ui/cc-test-reporter + ./ui/cc-test-reporter before-build + if [ -f coverage/lcov.info ]; then + ./ui/cc-test-reporter after-build --exit-code $? --coverage-input-type lcov + else + echo "Coverage report not found." + fi + working-directory: ./ui diff --git a/.github/workflows/ui-docker-build.yml b/.github/workflows/ui-docker-build.yml index 97a00e39..46424098 100644 --- a/.github/workflows/ui-docker-build.yml +++ b/.github/workflows/ui-docker-build.yml @@ -9,7 +9,7 @@ on: env: IMAGE_NAME: multiwoven/multiwoven-ui - IMAGE_TAG: latest-main + IMAGE_TAG: edge jobs: build_and_push: