[test] unit-test workflow

This commit is contained in:
Max 2022-05-26 23:41:38 +08:00
parent 85fdff5ab1
commit d12c61fe89
5 changed files with 16 additions and 27 deletions

View file

@ -27,7 +27,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go: [1.18]
go: [1.18.2]
db: [MySQL8.0, MySQL5.7, SQLite3]
if: >
${{ github.event.workflow_run.event == 'pull_request' &&
@ -135,15 +135,13 @@ jobs:
password: ${{ secrets.UNIT_PASS }}
- name: Setup Go ${{ matrix.go }}
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- name: Setup Go Tools
run: |
if [[ "${GO111MODULE}" = "on" ]]; then go mod download; fi
if [[ "${GO111MODULE}" = "on" ]]; then export PATH="${GOPATH}/bin:${GOROOT}/bin:${PATH}"; fi
if [[ "${GO111MODULE}" = "on" ]]; then make tools; fi
make tools
- name: Setup ENV & Host
env:

View file

@ -14,7 +14,7 @@ jobs:
release:
strategy:
matrix:
go: [1.18]
go: [1.18.2]
runs-on: "ubuntu-latest"
steps:
- name: Arm Build
@ -83,17 +83,13 @@ jobs:
uses: actions/checkout@v2
- name: Setup Go ${{ matrix.go }}
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- name: Setup Go Tools
run: |
if [[ "${GO111MODULE}" = "on" ]]; then go mod download; fi
if [[ "${GO111MODULE}" = "on" ]]; then export PATH="${GOPATH}/bin:${GOROOT}/bin:${PATH}"; fi
if [[ "${GO111MODULE}" = "on" ]]; then make tools; fi
go get github.com/go-bindata/go-bindata/...
go get github.com/elazarl/go-bindata-assetfs/...
make tools
- name: Make Artifacts Linux
run: |

View file

@ -14,7 +14,7 @@ jobs:
release:
strategy:
matrix:
go: [1.18]
go: [1.18.2]
runs-on: "macos-11"
steps:
- name: Install coscmd
@ -75,17 +75,13 @@ jobs:
uses: actions/checkout@v2
- name: Setup Go ${{ matrix.go }}
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- name: Setup Go Tools
run: |
if [[ "${GO111MODULE}" = "on" ]]; then go mod download; fi
if [[ "${GO111MODULE}" = "on" ]]; then export PATH="${GOPATH}/bin:${GOROOT}/bin:${PATH}"; fi
if [[ "${GO111MODULE}" = "on" ]]; then make tools; fi
go get github.com/go-bindata/go-bindata/...
go get github.com/elazarl/go-bindata-assetfs/...
make tools
- name: Make Artifacts MacOS
run: |

View file

@ -24,7 +24,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go: [1.18]
go: [1.18.2]
db: [MySQL8.0, MySQL5.7, SQLite3]
steps:
- name: Setup Cache
@ -83,15 +83,13 @@ jobs:
password: ${{ secrets.UNIT_PASS }}
- name: Setup Go ${{ matrix.go }}
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- name: Setup Go Tools
run: |
if [[ "${GO111MODULE}" = "on" ]]; then go mod download; fi
if [[ "${GO111MODULE}" = "on" ]]; then export PATH="${GOPATH}/bin:${GOROOT}/bin:${PATH}"; fi
if [[ "${GO111MODULE}" = "on" ]]; then make tools; fi
make tools
- name: Setup ENV & Host
env:

View file

@ -76,9 +76,10 @@ misspell:
.PHONY: tools
tools:
go install golang.org/x/lint/golint; \
go install github.com/client9/misspell/cmd/misspell;
go install golang.org/x/lint/golint@latest; \
go install github.com/client9/misspell/cmd/misspell@latest; \
go install github.com/go-bindata/go-bindata/...@latest;
# make plugin
.PHONY: plugin
plugin: