Version 2.9.1 #15
This file contains 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: Go Test π | |
on: [push, pull_request] | |
jobs: | |
build: | |
name: πΉ Test with Go ${{ matrix.go-version }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
go-version: | |
- 1.20.x | |
- 1.21.x | |
- 1.22.x | |
- 1.23.x | |
steps: | |
- name: π Checkout Repository | |
uses: actions/checkout@v4 | |
- name: π οΈ Setup Go ${{ matrix.go-version }} | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: π¦ Install Dependencies | |
run: go mod download | |
- name: π Set CLOUDINARY_URL | |
run: | | |
export CLOUDINARY_URL=$(bash scripts/get_test_cloud.sh) | |
echo "CLOUDINARY_URL=$CLOUDINARY_URL" >> $GITHUB_ENV | |
echo "cloud_name: $(echo $CLOUDINARY_URL | cut -d'@' -f2)" | |
- name: π§° Install gotestsum | |
run: go install gotest.tools/gotestsum@latest | |
- name: π§ͺ Run Tests | |
run: | | |
gotestsum --junitfile unit-tests.xml --format pkgname ./... | |
- name: π Test Summary | |
uses: test-summary/action@v2 | |
with: | |
paths: "unit-tests.xml" | |
if: always() |