diff --git a/.github/workflows/protocol.yml b/.github/workflows/protocol.yml index 755557039..218c01da2 100644 --- a/.github/workflows/protocol.yml +++ b/.github/workflows/protocol.yml @@ -6,6 +6,17 @@ on: pull_request: branches: [ master ] +env: + # GITHUB_PULL_REQUEST_URL are used for commenting test reports in Launchable Github App. + # https://github.com/launchableinc/cli/blob/v1.80.1/launchable/utils/link.py#L42 + GITHUB_PULL_REQUEST_URL: ${{ github.event.pull_request.html_url }} + # The following envs are necessary in Launchable tokenless authentication. + # https://github.com/launchableinc/cli/blob/v1.80.1/launchable/utils/authentication.py#L20 + LAUNCHABLE_ORGANIZATION: "ruby" + LAUNCHABLE_WORKSPACE: "debug" + # https://github.com/launchableinc/cli/blob/v1.80.1/launchable/utils/authentication.py#L71 + GITHUB_PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }} + jobs: test: @@ -18,6 +29,24 @@ jobs: steps: - uses: actions/checkout@v4 + # Launchable requires Python and Java + # https://www.launchableinc.com/docs/resources/cli-reference/ + - uses: actions/setup-python@v4 + with: + python-version: "3.10" + - name: Set up JDK 1.8 + uses: actions/setup-java@v3 + with: + distribution: 'adopt' + java-version: '8' + # Setup Launchable + - name: Launchable - install command + run: pip install launchable + - name: Launchable - verify + run: launchable verify + - name: Launchable - record build + run: launchable record build --name ${GITHUB_PR_HEAD_SHA} + - name: Set up Ruby uses: ruby/setup-ruby@v1 with: @@ -25,6 +54,10 @@ jobs: bundler-cache: true - name: Run tests run: | + gem install test-unit-runner-junitxml bundle exec rake clobber bundle exec rake compile - bundle exec rake test_protocol + TESTOPTS="--runner=junitxml --junitxml-output-file=protocol.xml" bundle exec rake test_protocol + - name: Launchable - record tests + run: launchable record tests --flavor test=protocol --flavor os=ubuntu-latest --flavor ruby=${{ matrix.ruby-version }} file protocol.xml + if: always() diff --git a/.github/workflows/ruby-macos.yaml b/.github/workflows/ruby-macos.yaml index 4b04e8647..f11eca6f6 100644 --- a/.github/workflows/ruby-macos.yaml +++ b/.github/workflows/ruby-macos.yaml @@ -6,6 +6,17 @@ on: pull_request: branches: [ master ] +env: + # GITHUB_PULL_REQUEST_URL are used for commenting test reports in Launchable Github App. + # https://github.com/launchableinc/cli/blob/v1.80.1/launchable/utils/link.py#L42 + GITHUB_PULL_REQUEST_URL: ${{ github.event.pull_request.html_url }} + # The following envs are necessary in Launchable tokenless authentication. + # https://github.com/launchableinc/cli/blob/v1.80.1/launchable/utils/authentication.py#L20 + LAUNCHABLE_ORGANIZATION: "ruby" + LAUNCHABLE_WORKSPACE: "debug" + # https://github.com/launchableinc/cli/blob/v1.80.1/launchable/utils/authentication.py#L71 + GITHUB_PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }} + jobs: test: @@ -18,6 +29,24 @@ jobs: steps: - uses: actions/checkout@v4 + # Launchable requires Python and Java + # https://www.launchableinc.com/docs/resources/cli-reference/ + - uses: actions/setup-python@v4 + with: + python-version: "3.10" + - name: Set up JDK 1.8 + uses: actions/setup-java@v3 + with: + distribution: 'adopt' + java-version: '8' + # Setup Launchable + - name: Launchable - install command + run: pip install launchable + - name: Launchable - verify + run: launchable verify + - name: Launchable - record build + run: launchable record build --name ${GITHUB_PR_HEAD_SHA} + - name: Set up Ruby uses: ruby/setup-ruby@v1 with: @@ -27,4 +56,7 @@ jobs: run: | bundle exec rake clobber bundle exec rake compile - bundle exec rake test_console + TESTOPTS="--runner=junitxml --junitxml-output-file=ruby-macos.xml" bundle exec rake test_console + - name: launchable record tests + run: launchable record tests --flavor test=console --flavor os=macos-latest --flavor ruby=${{ matrix.ruby-version }} file ruby-macos.xml + if: always() diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index dd76ced54..cf39c9d39 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -6,6 +6,17 @@ on: pull_request: branches: [ master ] +env: + # GITHUB_PULL_REQUEST_URL are used for commenting test reports in Launchable Github App. + # https://github.com/launchableinc/cli/blob/v1.80.1/launchable/utils/link.py#L42 + GITHUB_PULL_REQUEST_URL: ${{ github.event.pull_request.html_url }} + # The following envs are necessary in Launchable tokenless authentication. + # https://github.com/launchableinc/cli/blob/v1.80.1/launchable/utils/authentication.py#L20 + LAUNCHABLE_ORGANIZATION: "ruby" + LAUNCHABLE_WORKSPACE: "debug" + # https://github.com/launchableinc/cli/blob/v1.80.1/launchable/utils/authentication.py#L71 + GITHUB_PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }} + jobs: test: @@ -18,6 +29,24 @@ jobs: steps: - uses: actions/checkout@v4 + # Launchable requires Python and Java + # https://www.launchableinc.com/docs/resources/cli-reference/ + - uses: actions/setup-python@v4 + with: + python-version: "3.10" + - name: Set up JDK 1.8 + uses: actions/setup-java@v3 + with: + distribution: 'adopt' + java-version: '8' + # Setup Launchable + - name: Launchable - install command + run: pip install launchable + - name: Launchable - verify + run: launchable verify + - name: Launchable - record build + run: launchable record build --name ${GITHUB_PR_HEAD_SHA} + - name: Set up Ruby uses: ruby/setup-ruby@v1 with: @@ -25,6 +54,10 @@ jobs: bundler-cache: true - name: Run tests run: | + gem install test-unit-runner-junitxml bundle exec rake clobber bundle exec rake compile - bundle exec rake test_console + TESTOPTS="--runner=junitxml --junitxml-output-file=ruby.xml" bundle exec rake test_console + - name: launchable record tests + run: launchable record tests --flavor test=console --flavor os=ubuntu-latest --flavor ruby=${{ matrix.ruby-version }} file ruby.xml + if: always() diff --git a/.github/workflows/test_test.yml b/.github/workflows/test_test.yml index 3123697fe..3bdb131be 100644 --- a/.github/workflows/test_test.yml +++ b/.github/workflows/test_test.yml @@ -6,6 +6,17 @@ on: pull_request: branches: [ master ] +env: + # GITHUB_PULL_REQUEST_URL are used for commenting test reports in Launchable Github App. + # https://github.com/launchableinc/cli/blob/v1.80.1/launchable/utils/link.py#L42 + GITHUB_PULL_REQUEST_URL: ${{ github.event.pull_request.html_url }} + # The following envs are necessary in Launchable tokenless authentication. + # https://github.com/launchableinc/cli/blob/v1.80.1/launchable/utils/authentication.py#L20 + LAUNCHABLE_ORGANIZATION: "ruby" + LAUNCHABLE_WORKSPACE: "debug" + # https://github.com/launchableinc/cli/blob/v1.80.1/launchable/utils/authentication.py#L71 + GITHUB_PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }} + jobs: test: @@ -18,6 +29,24 @@ jobs: steps: - uses: actions/checkout@v4 + # Launchable requires Python and Java + # https://www.launchableinc.com/docs/resources/cli-reference/ + - uses: actions/setup-python@v4 + with: + python-version: "3.10" + - name: Set up JDK 1.8 + uses: actions/setup-java@v3 + with: + distribution: 'adopt' + java-version: '8' + # Setup Launchable + - name: Launchable - install command + run: pip install launchable + - name: Launchable - verify + run: launchable verify + - name: Launchable - record build + run: launchable record build --name ${GITHUB_PR_HEAD_SHA} + - name: Set up Ruby uses: ruby/setup-ruby@v1 with: @@ -27,4 +56,7 @@ jobs: run: | bundle exec rake clobber bundle exec rake compile - bundle exec rake test_test + TESTOPTS="--runner=junitxml --junitxml-output-file=test_test.xml" bundle exec rake test_test + - name: launchable record tests + run: launchable record tests --flavor test=test-framework --flavor os=ubuntu-latest --flavor ruby=${{ matrix.ruby-version }} file test_test.xml + if: always()