Detect CI environment and send associated data along with the test suite #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test Example Project To Verify Test Collector Integration | |
# this workflow will always fail since we've added failing tests to verify collector integration with all kinds of possible test results | |
on: | |
pull_request: | |
branches: [main] | |
jobs: | |
example-project-unit-tests: | |
name: Run Example Project Unit Tests | |
runs-on: ubuntu-latest | |
env: | |
BUILDKITE_ANALYTICS_TOKEN: ${{ secrets.BUILDKITE_ANALYTICS_TOKEN }} | |
BUILDKITE_ANALYTICS_DEBUG_ENABLED: ${{ secrets.BUILDKITE_ANALYTICS_DEBUG_ENABLED }} | |
steps: | |
- name: Git Checkout | |
uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/[email protected] | |
with: | |
distribution: zulu | |
java-version: 17 | |
- name: Debug Build | |
run: ./gradlew :example:buildDebug | |
- name: Example Project Unit Tests | |
run: "support/scripts/example-unit-tests" | |
example-project-instrumented-tests: | |
name: Run Example Project Instrumented Tests | |
runs-on: macos-latest | |
env: | |
BUILDKITE_ANALYTICS_TOKEN: ${{ secrets.BUILDKITE_ANALYTICS_TOKEN }} | |
BUILDKITE_ANALYTICS_DEBUG_ENABLED: ${{ secrets.BUILDKITE_ANALYTICS_DEBUG_ENABLED }} | |
GITHUB_ACTION: ${{ github.action }} | |
GITHUB_RUN_ID: ${{ github.run_id }} | |
GITHUB_RUN_NUMBER: ${{ github.run_number }} | |
GITHUB_RUN_ATTEMPT: ${{ github.run_attempt }} | |
GITHUB_REPOSITORY: ${{ github.repository }} | |
GITHUB_REF_NAME: ${{ github.ref_name }} | |
GITHUB_SHA: ${{ github.sha }} | |
GITHUB_WORKFLOW: ${{ github.workflow }} | |
GITHUB_ACTOR: ${{ github.actor }} | |
steps: | |
- name: Git Checkout | |
uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/[email protected] | |
with: | |
distribution: zulu | |
java-version: 17 | |
- name: Debug Build | |
run: ./gradlew :example:buildDebug | |
- name: Example Project Instrumented Tests | |
uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
api-level: 27 | |
arch: x86_64 | |
script: "support/scripts/example-instrumented-tests" |