Add additional physical read/write metrics to oracledb receiver #7289
Workflow file for this run
This file contains hidden or 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: scoped-test | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
types: [opened, synchronize, reopened] | |
permissions: read-all | |
jobs: | |
changedfiles: | |
runs-on: ubuntu-latest | |
if: ${{ github.actor != 'dependabot[bot]' }} | |
outputs: | |
go_sources: ${{ steps.changed-source.outputs.go_sources }} | |
go_tests: ${{ steps.changed-test.outputs.go_tests }} | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
with: | |
fetch-depth: 0 | |
- name: Get changed files | |
id: changed-source | |
run: | | |
files=$(git diff --name-only --diff-filter=ACMRTUXB $(git merge-base origin/main $PR_HEAD) $PR_HEAD | grep .go$ | xargs) | |
echo "go_sources=$files" >> $GITHUB_OUTPUT | |
- name: Get changed files | |
id: changed-test | |
run: | | |
files=$(git diff --name-only --diff-filter=ACMRTUXB $(git merge-base origin/main $PR_HEAD) $PR_HEAD | grep _test.go$ | xargs) | |
echo "go_tests=$files" >> $GITHUB_OUTPUT | |
scoped-tests: | |
needs: changedfiles | |
if: needs.changedfiles.outputs.go_sources != '' || needs.changedfiles.outputs.go_tests != '' | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ windows-latest ] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Echo changed files | |
shell: bash | |
run: | | |
echo "go_sources: ${{ needs.changedfiles.outputs.go_sources }}" | |
echo "go_tests: ${{ needs.changedfiles.outputs.go_tests }}" | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5 | |
with: | |
go-version: "1.23.7" | |
cache: false | |
- name: Try to restore go-cache | |
id: go-cache | |
timeout-minutes: 25 | |
uses: actions/cache/restore@d4323d4df104b026a6aa633fdb11d772146be0bf # v4 | |
with: | |
path: | | |
~/go/bin | |
~/go/pkg/mod | |
./.tools | |
key: go-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }} | |
- name: Build gotestsum on Windows | |
if: runner.os == 'Windows' | |
run: make "$(${PWD} -replace '\\', '/')/.tools/gotestsum" | |
- name: Build gotestsum | |
if: runner.os != 'Windows' | |
run: make "$PWD/.tools/gotestsum" | |
- name: Run changed tests | |
if: needs.changedfiles.outputs.go_tests | |
env: | |
CHANGED_GOLANG_TESTS: ${{ needs.changedfiles.outputs.go_tests }} | |
run: | | |
make run-changed-tests | |
- name: Run tests on dependent components | |
if: needs.changedfiles.outputs.go_sources | |
env: | |
CHANGED_GOLANG_SOURCES: ${{ needs.changedfiles.outputs.go_sources }} | |
run: | | |
make for-affected-components CMD="make test" |