Skip to content

Commit

Permalink
split test for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
raa0121 committed Aug 24, 2020
1 parent fa406d3 commit d5e9d59
Showing 1 changed file with 51 additions and 18 deletions.
69 changes: 51 additions & 18 deletions .github/workflows/go.yaml
Expand Up @@ -13,22 +13,56 @@ jobs:

strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
os: [ ubuntu-latest, macos-latest ]
go: [ '1.11.13', '1.12.17', '1.13.15', '1.14.7', '1.15' ]
include:
- os: ubuntu-latest
shell: bash
- os: macos-latest
shell: bash
- os: windows-latest
shell: msys2 {0}
fail-fast: false
steps:
- if: startsWith(matrix.os, 'macos')
run: brew update

- if: startsWith(matrix.os, 'windows')
uses: msys2/setup-msys2@v2
- uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}

- name: Get Build Tools
run: |
go get github.com/mattn/goveralls
go get golang.org/x/tools/cmd/cover
- name: Add $GOPATH/bin to $PATH
run: |
echo "::add-path::$(go env GOPATH)/bin"
- uses: actions/checkout@v2

- name: Setup goveralls
run: goveralls -repotoken 3qJVUE0iQwqnCbmNcDsjYu1nh4J4KIFXx -parallel

- name: Test1
run: go test -race -v . -tags ""

- name: Test2
run: go test -race -v . -tags "libsqlite3"

- name: Test3
run: go test -race -v . -tags "sqlite_allow_uri_authority sqlite_app_armor sqlite_foreign_keys sqlite_fts5 sqlite_icu sqlite_introspect sqlite_json sqlite_preupdate_hook sqlite_secure_delete sqlite_see sqlite_stat4 sqlite_trace sqlite_userauth sqlite_vacuum_incr sqlite_vtable sqlite_unlock_notify"

- name: Test4
run: go test -race -v . -tags "sqlite_vacuum_full"

test-windows:
name: Test for Windows
runs-on: windows-latest
defaults:
run:
shell: bash

strategy:
matrix:
go: [ '1.11.13', '1.12.17', '1.13.15', '1.14.7', '1.15' ]
fail-fast: false
steps:
- uses: msys2/setup-msys2@v2
with:
update: true
install: mingw-w64-x86_64-toolchain mingw-w64-x86_64-sqlite3
Expand All @@ -43,34 +77,33 @@ jobs:
run: |
go get github.com/mattn/goveralls
go get golang.org/x/tools/cmd/cover
shell: msys2 {0}

- name: Add $GOPATH/bin to $PATH
run: |
echo "::add-path::$(go env GOPATH)/bin"
shell: msys2 {0}

- uses: actions/checkout@v2

- name: Setup goveralls
run: goveralls -repotoken 3qJVUE0iQwqnCbmNcDsjYu1nh4J4KIFXx -parallel
shell: msys2 {0}

- name: Test1
run: go test -race -v . -tags ""
shell: ${{ matrix.shell }}
shell: msys2 {0}

- name: Test2
run: go test -race -v . -tags "libsqlite3"
shell: ${{ matrix.shell }}
shell: msys2 {0}

- name: Test3
run: go test -race -v . -tags "sqlite_allow_uri_authority sqlite_app_armor sqlite_foreign_keys sqlite_fts5 sqlite_icu sqlite_introspect sqlite_json sqlite_preupdate_hook sqlite_secure_delete sqlite_see sqlite_stat4 sqlite_trace sqlite_userauth sqlite_vacuum_incr sqlite_vtable sqlite_unlock_notify"
shell: ${{ matrix.shell }}

- name: Test3
run: go test -race -v . -tags "sqlite_vacuum_full"
shell: ${{ matrix.shell }}
shell: msys2 {0}

finish:
needs: test
needs: [test, test-windows]
name: Test Finished
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit d5e9d59

Please sign in to comment.