From 9d29c760a932fbbd3c644f4dc2e5e34559f09baf Mon Sep 17 00:00:00 2001 From: Milwad Date: Mon, 23 Sep 2024 20:12:06 +0330 Subject: [PATCH] Create tests.yml --- .github/workflows/tests.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..a87cf83 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,37 @@ +name: "Tests" + +on: + push: + pull_request: + +jobs: + test: + env: + GOPATH: ${{ github.workspace }} + + defaults: + run: + working-directory: ${{ env.GOPATH }}/src/github.com/${{ github.repository }} + + strategy: + matrix: + go-version: [1.18.x, 1.19.x, 1.20.x, 1.21.x, 1.22.x, 1.23.x] + os: [ubuntu-latest, windows-latest] + + runs-on: ${{ matrix.os }} + + steps: + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: ${{ matrix.go-version }} + check-latest: true + cache: false + - name: Checkout code + uses: actions/checkout@v4 + with: + path: ${{ env.GOPATH }}/src/github.com/${{ github.repository }} + - name: Test + run: | + go get -d -t ./... + make test \ No newline at end of file