From dd1f02703a04601299d0457dfc71a59d0f9d187f Mon Sep 17 00:00:00 2001 From: Allan Nava Date: Thu, 25 Jul 2024 22:48:33 +0200 Subject: [PATCH] added go tests --- .github/workflows/go-test.yml | 42 +++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/go-test.yml diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml new file mode 100644 index 0000000..a887e68 --- /dev/null +++ b/.github/workflows/go-test.yml @@ -0,0 +1,42 @@ +name: Go test workflow +on: [push] +# +env: + APP_ENV: runner + # Setting an environment variable with the value of a configuration variable + CLIENT_KEY: ${{ secrets.CLIENT_KEY }} + # Setting an environment variable with the value of a configuration variable + CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }} + # +# +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + go-version: [ '1.19.x', '1.20.x', '1.21.x', '1.22.x' ] + # + steps: + - uses: actions/checkout@v3 + - name: Setup Go ${{ matrix.go-version }} + uses: actions/setup-go@v3 + with: + go-version: ${{ matrix.go-version }} + cache: true + #cache-dependency-path: subdir/go.sum + # + # You can test your matrix by printing the current Go version + - name: Display Go version + run: go version + # + - name: Install dependencies + run: go mod tidy + # + - name: Build + run: go build -v ./... + # + - name: Test with the Go CLI + run: go test -v ./... + # + # + # \ No newline at end of file