From d5e9d59320f2c7f824a229e12333ad949bc674f3 Mon Sep 17 00:00:00 2001 From: raa0121 Date: Mon, 24 Aug 2020 18:57:23 +0900 Subject: [PATCH] split test for windows --- .github/workflows/go.yaml | 69 +++++++++++++++++++++++++++++---------- 1 file changed, 51 insertions(+), 18 deletions(-) diff --git a/.github/workflows/go.yaml b/.github/workflows/go.yaml index 21f4b80d..4eec044b 100644 --- a/.github/workflows/go.yaml +++ b/.github/workflows/go.yaml @@ -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 @@ -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: