Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -288,16 +288,20 @@ jobs:
- name: Run Unit Tests
if: startsWith( matrix.go-version, '1.23' ) != true
run: make gotest GROUP=${{ matrix.group }}
- name: Debug startsWith condition
run: |
echo "go-version: ${{ matrix.go-version }}"
echo "startsWith result: ${{ startsWith(matrix.go-version, '1.23') }}"
- name: Run Unit Tests With JUnit and Coverage
if: startsWith( matrix.go-version, '1.23' ) # only run junit/coverage on one version
if: startsWith( matrix.go-version, '1.23' ) != true # only run junit/coverage on one version

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this was missed out in the previous PRs (Go1.22 -> Go1.23)... startsWith( matrix.go-version, '1.23' ) is correct, startsWith( matrix.go-version, '1.23' ) != true is wrong, so instead you would want to change the latter to the former everywhere else

cc @mx-psi can correct me

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think Yang is right here, yep

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like there's something we're still missing 🤔

Run Unit Tests, as it's configured today, should only run when the go version doesn't start with 1.23. Therefore it should only run for go 1.24. This is not the behavior I'm seeing.:

  • It runs for 1.23[1]
  • It runs for 1.24[2]

Now for the JUnit tests, it is configured to run when it starts with 1.23, but it's not running for any of the go versions.

My hypothesis is that startsWith(...) is not returning anything, and therefore != true is triggering the unit tests because empty is different than true

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could try and print the result of the expression in the Github Actions logs and we can check it on this PR

run: make gotest-with-junit-and-cover GROUP=${{ matrix.group }}
- uses: actions/upload-artifact@v4
if: startsWith( matrix.go-version, '1.23' ) # only upload artifact for one version
if: startsWith( matrix.go-version, '1.23' ) != true # only upload artifact for one version
with:
name: coverage-artifacts-${{ matrix.go-version }}-${{ matrix.runner }}-${{ matrix.group }}
path: ${{ matrix.group }}-coverage.txt
- uses: actions/upload-artifact@v4
if: startsWith( matrix.go-version, '1.23' ) # only upload artifact for one version
if: startsWith( matrix.go-version, '1.23' ) != true # only upload artifact for one version
with:
name: test-results-${{ matrix.go-version }}-${{ matrix.runner }}-${{ matrix.group }}
path: internal/tools/testresults/
Expand Down