diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2651d8e..69e9bca 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,22 +1,32 @@ name: Tests -on: [push] +on: + push: + branches: [main] + pull_request: + branches: [main] + jobs: - tests-on: - name: ${{matrix.go-version}} ${{matrix.os}} + name: ${{ matrix.os }} - Go v${{ matrix.go-version }} runs-on: ${{ matrix.os }} strategy: matrix: - go-version: [1.16.x, 1.17.x] - os: [macos-latest, windows-latest, ubuntu-latest] + go-version: + - "1.16.x" + - "1.17.x" + os: + - "macos-latest" + - "windows-latest" + - "ubuntu-latest" + steps: - - name: Checkout Code - uses: actions/checkout@v1 - with: - fetch-depth: 1 - - name: Test - env: - GOPROXY: https://proxy.golang.org - run: | - go mod tidy -v - go test -race ./... + - uses: actions/checkout@v2 + - name: Setup Go ${{ matrix.go }} + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go-version }} + + - name: Test + run: | + go mod tidy -v + go test -tags "sqlite" -cover ./... \ No newline at end of file