Remove redundant groups #688
Workflow file for this run
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: Unit Tests | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
schedule: | |
- cron: 0 */4 * * 1-5 | |
concurrency: | |
group: "${{ github.workflow }}-${{ github.ref }}" | |
cancel-in-progress: "${{ github.ref != 'refs/heads/master' }}" | |
jobs: | |
ruby-34: | |
name: "Ruby 3.4" | |
uses: ./.github/workflows/_unit_test.yml | |
with: | |
engine: ruby | |
version: "3.4" | |
alias: ruby-34 | |
ruby-33: | |
name: "Ruby 3.3" | |
uses: ./.github/workflows/_unit_test.yml | |
with: | |
engine: ruby | |
version: "3.3" | |
alias: ruby-33 | |
ruby-32: | |
name: "Ruby 3.2" | |
uses: ./.github/workflows/_unit_test.yml | |
with: | |
engine: ruby | |
version: "3.2" | |
alias: ruby-32 | |
ruby-31: | |
name: "Ruby 3.1" | |
uses: ./.github/workflows/_unit_test.yml | |
with: | |
engine: ruby | |
version: "3.1" | |
alias: ruby-31 | |
ruby-30: | |
name: "Ruby 3.0" | |
uses: ./.github/workflows/_unit_test.yml | |
with: | |
engine: ruby | |
version: "3.0" | |
alias: ruby-30 | |
ruby-27: | |
name: "Ruby 2.7" | |
uses: ./.github/workflows/_unit_test.yml | |
with: | |
engine: ruby | |
version: "2.7" | |
alias: ruby-27 | |
ruby-26: | |
name: "Ruby 2.6" | |
uses: ./.github/workflows/_unit_test.yml | |
with: | |
engine: ruby | |
version: "2.6" | |
alias: ruby-26 | |
ruby-25: | |
name: "Ruby 2.5" | |
uses: ./.github/workflows/_unit_test.yml | |
with: | |
engine: ruby | |
version: "2.5" | |
alias: ruby-25 | |
jruby-94: | |
name: "JRuby 9.4" | |
uses: ./.github/workflows/_unit_test.yml | |
with: | |
engine: jruby | |
version: "9.4" | |
alias: jruby-94 | |
jruby-93: | |
name: "JRuby 9.3" | |
uses: ./.github/workflows/_unit_test.yml | |
with: | |
engine: jruby | |
version: "9.3" | |
alias: jruby-93 | |
jruby-92: | |
name: "JRuby 9.2" | |
uses: ./.github/workflows/_unit_test.yml | |
with: | |
engine: jruby | |
version: "9.2" | |
alias: jruby-92 | |
junit: | |
name: dd/junit | |
if: ${{ !cancelled() }} | |
runs-on: ubuntu-24.04 | |
container: | |
image: datadog/ci | |
credentials: | |
username: "${{ secrets.DOCKERHUB_USERNAME }}" | |
password: "${{ secrets.DOCKERHUB_TOKEN }}" | |
env: | |
DD_API_KEY: "${{ secrets.DD_API_KEY }}" | |
DD_ENV: ci | |
DATADOG_SITE: datadoghq.com | |
DD_SERVICE: dd-trace-rb | |
DD_GIT_REPOSITORY_URL: "${{ github.repositoryUrl }}" | |
needs: | |
- ruby-34 | |
- ruby-33 | |
- ruby-32 | |
- ruby-31 | |
- ruby-30 | |
- ruby-27 | |
- ruby-26 | |
- ruby-25 | |
- jruby-94 | |
- jruby-93 | |
- jruby-92 | |
steps: | |
- run: mkdir -p tmp/rspec && datadog-ci version | |
- name: Download all junit reports | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
with: | |
path: tmp/rspec | |
pattern: junit-* | |
merge-multiple: true | |
- name: Format file paths | |
run: sed -i 's;file="./;file=";g' tmp/rspec/*.xml | |
# Note that GITHUB_SHA for this event is the last merge commit of the pull request merge branch, | |
# which `datadog-ci` failed to sync the correct git metadata in Github Actions. | |
# | |
# This causes the CODEOWNERS data being lost. | |
# | |
# This is a workaround to manually set the correct git commit sha for the pull request event. | |
- if: github.event_name == 'pull_request' | |
run: echo "DD_GIT_COMMIT_SHA=${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV | |
- if: github.event_name != 'pull_request' | |
run: echo "DD_GIT_COMMIT_SHA=${{ github.sha }}" >> $GITHUB_ENV | |
- run: echo $DD_GIT_COMMIT_SHA | |
- name: Upload junit reports | |
run: datadog-ci junit upload --verbose tmp/rspec/ | |
coverage: | |
name: codecov/upload | |
runs-on: ubuntu-24.04 | |
needs: | |
- ruby-34 | |
- ruby-33 | |
- ruby-32 | |
- ruby-31 | |
- ruby-30 | |
- ruby-27 | |
- ruby-26 | |
- ruby-25 | |
- jruby-94 | |
- jruby-93 | |
- jruby-92 | |
container: | |
image: ghcr.io/datadog/images-rb/engines/ruby:3.4 | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Download lockfile | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
with: | |
name: ${{ needs.ruby-34.outputs.lockfile }} | |
- name: Restore cache | |
uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 | |
id: restore-cache | |
with: | |
key: ${{ needs.ruby-34.outputs.cache-key }} | |
path: "/usr/local/bundle" | |
- run: bundle check || bundle install | |
- name: Download all coverage data | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
with: | |
path: coverage | |
pattern: coverage-* | |
merge-multiple: true | |
- name: Generate coverage report | |
run: bundle exec rake coverage:report | |
- name: Upload coverage report | |
uses: codecov/codecov-action@13ce06bfc6bbe3ecf90edbbf1bc32fe5978ca1d3 # v5.3.1 | |
with: | |
files: coverage/report/coverage.xml | |
# Uncomment the following line to enable verbose output for debugging | |
# verbose: true | |
complete: | |
name: Unit Tests (complete) | |
runs-on: ubuntu-24.04 | |
needs: | |
- ruby-34 | |
- ruby-33 | |
- ruby-32 | |
- ruby-31 | |
- ruby-30 | |
- ruby-27 | |
- ruby-26 | |
- ruby-25 | |
- jruby-94 | |
- jruby-93 | |
- jruby-92 | |
steps: | |
- run: echo "DONE!" |