Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore] [CI] Add a unittest job without a matrix #8218

Merged
merged 1 commit into from
Aug 11, 2023
Merged
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
18 changes: 17 additions & 1 deletion .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ jobs:
make crosslink
git diff -s --exit-code || (echo 'Replace statements are out of date, please run "make crosslink" and commit the changes in this PR.' && exit 1)

unittest:
unittest-matrix:
strategy:
matrix:
go-version: ["1.20", 1.19] # 1.20 needs quotes otherwise it's interpreted as 1.2
Expand Down Expand Up @@ -158,6 +158,22 @@ jobs:
key: unittest-${{ runner.os }}-go-build-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }}
- name: Run Unit Tests
run: make gotest
unittest:
if: always()
runs-on: ubuntu-latest
needs: [setup-environment, unittest-matrix]
steps:
- name: Print result
run: echo ${{ needs.unittest-matrix.result }}
- name: Interpret result
run: |
if [[ success == ${{ needs.unittest-matrix.result }} ]]
then
echo "All matrix jobs passed!"
else
echo "One or more matrix jobs failed."
false
fi

test-coverage:
runs-on: ubuntu-latest
Expand Down