Skip to content

Commit

Permalink
[chore] [CI] Add a unittest job without a matrix (#8218)
Browse files Browse the repository at this point in the history
To not update required jobs every time a new go version is released.

Needed for
#8208
  • Loading branch information
dmitryax authored Aug 11, 2023
1 parent 9d7deb4 commit c46704a
Showing 1 changed file with 17 additions and 1 deletion.
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

0 comments on commit c46704a

Please sign in to comment.