From fbc904212ee1ffd94bda5cb94cdfbab73b9f430a Mon Sep 17 00:00:00 2001 From: Ahmed Bham Date: Mon, 29 Jul 2024 22:50:57 +0000 Subject: [PATCH] go ci workflow --- .github/workflows/build-and-test-go-app.yml | 32 +++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/build-and-test-go-app.yml diff --git a/.github/workflows/build-and-test-go-app.yml b/.github/workflows/build-and-test-go-app.yml new file mode 100644 index 0000000..6c4cd9d --- /dev/null +++ b/.github/workflows/build-and-test-go-app.yml @@ -0,0 +1,32 @@ +name: Upload Go test results + +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + go-version: [ '1.19', '1.20', '1.21.x' ] + + steps: + - uses: actions/checkout@v4 + + - name: Setup Go + uses: actions/setup-go@v5 + with: + go-version: ${{ matrix.go-version }} + + - name: Install dependencies + run: go get . + + - name: Test with Go + run: go test -json > TestResults-${{ matrix.go-version }}.json + + - name: Upload Go test results + uses: actions/upload-artifact@v4 + with: + name: Go-results-${{ matrix.go-version }} + path: TestResults-${{ matrix.go-version }}.json +