diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index ffc11ab8d98..769d8216715 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -21,21 +21,25 @@ jobs: with: token: '' filters: | - go_files: + changed_files: + - .github/workflows/codecov.yml - 'go/**' + - go.mod + - go.sum + - Makefile - name: Set up Go - if: steps.changes.outputs.go_files == 'true' + if: steps.changes.outputs.changed_files == 'true' uses: actions/setup-go@v4 with: go-version: 1.21.5 - name: Set up python - if: steps.changes.outputs.go_files == 'true' + if: steps.changes.outputs.changed_files == 'true' uses: actions/setup-python@v4 - name: Tune the OS - if: steps.changes.outputs.go_files == 'true' + if: steps.changes.outputs.changed_files == 'true' run: | sudo sysctl -w net.ipv4.ip_local_port_range="22768 65535" # Increase the asynchronous non-blocking I/O. More information at https://dev.mysql.com/doc/refman/5.7/en/innodb-parameters.html#sysvar_innodb_use_native_aio @@ -43,7 +47,7 @@ jobs: sudo sysctl -p /etc/sysctl.conf - name: Get dependencies - if: steps.changes.outputs.go_files == 'true' + if: steps.changes.outputs.changed_files == 'true' run: | export DEBIAN_FRONTEND="noninteractive" sudo apt-get update @@ -81,12 +85,12 @@ jobs: go install golang.org/x/tools/cmd/goimports@latest - name: Run make tools - if: steps.changes.outputs.go_files == 'true' + if: steps.changes.outputs.changed_files == 'true' run: | make tools - name: Run unit tests and generate code coverage reports - if: steps.changes.outputs.go_files == 'true' + if: steps.changes.outputs.changed_files == 'true' timeout-minutes: 45 run: | set -exo pipefail @@ -97,12 +101,13 @@ jobs: export NOVTADMINBUILD=1 # Exclude endtoend tests from the coverage report. + # TODO: figure out how best to include our endtoend tests in the coverage report. rm -rf go/test/endtoend go/*/endtoend go/vt/*/endtoend go/cmd/vttestserver eatmydata -- make unit_test_cover - name: Upload coverage reports to codecov.io - if: steps.changes.outputs.go_files == 'true' + if: steps.changes.outputs.changed_files == 'true' uses: codecov/codecov-action@v3 env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}