Skip to content

Commit

Permalink
Create tests.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
milwad-dev committed Sep 23, 2024
1 parent 3dbe8a4 commit 9d29c76
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 9d29c76

Please sign in to comment.