Skip to content

Commit

Permalink
Add Thundra Foresight Integration to the CI Build (#4313)
Browse files Browse the repository at this point in the history
  • Loading branch information
rwxdash authored Sep 7, 2021
1 parent c97c1e3 commit 475e619
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
22 changes: 20 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ env:
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

jobs:
thundra_test_initializer:
runs-on: ubuntu-latest
outputs:
thundra_agent_testrun_id: ${{ steps.thundra_test_initializer.outputs.thundra_agent_testrun_id }}
steps:
- uses: actions/checkout@v2
- id: thundra_test_initializer
uses: thundra-io/thundra-test-init-action@v1
find_gradle_jobs:
runs-on: ubuntu-18.04
outputs:
Expand All @@ -34,7 +42,7 @@ jobs:
echo $TASKS
echo "::set-output name=matrix::{\"gradle_args\":$TASKS}"
check:
needs: find_gradle_jobs
needs: [find_gradle_jobs, thundra_test_initializer]
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.find_gradle_jobs.outputs.matrix) }}
Expand All @@ -53,9 +61,19 @@ jobs:
key: ${{ runner.os }}-gradle-home-${{matrix.gradle_args}}_check-${{ hashFiles('**/*.gradle') }}
- name: Clear existing docker image cache
run: docker image prune -af
- name: Thundra Gradle Test Instrumentation
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
uses: thundra-io/thundra-gradle-test-action@v1
with:
apikey: ${{ secrets.THUNDRA_API_KEY }}
project_id: ${{ secrets.THUNDRA_PROJECT_ID }}
- name: Build and test with Gradle (${{matrix.gradle_args}})
run: |
./gradlew --no-daemon --continue --scan ${{matrix.gradle_args}}
./gradlew --no-daemon --continue --scan ${{matrix.gradle_args}} \
$($THUNDRA_GRADLE_INIT_SCRIPT_PATH || echo "--init-script $THUNDRA_GRADLE_INIT_SCRIPT_PATH")
env:
THUNDRA_AGENT_TEST_RUN_ID: ${{ needs.thundra_test_initializer.outputs.thundra_agent_testrun_id }}
THUNDRA_AGENT_REPORT_REST_BASEURL: https://collector.thundra.us/v1
httpclient5_test:
runs-on: ubuntu-18.04
steps:
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Testcontainers

[![Thundra Foresight](https://thundra-assets-prod.s3.us-west-2.amazonaws.com/images/badges/thundra-foresight-badge-enabled.svg)](https://foresight.thundra.live/testRuns/5a49cc30-f063-11eb-9a03-0242ac130003)

> Testcontainers is a Java library that supports JUnit tests, providing lightweight, throwaway instances of common databases, Selenium web browsers, or anything else that can run in a Docker container.
![Testcontainers logo](docs/logo.png)
Expand Down

0 comments on commit 475e619

Please sign in to comment.