[test] unit-test workflow
This commit is contained in:
parent
85fdff5ab1
commit
d12c61fe89
5 changed files with 16 additions and 27 deletions
8
.github/workflows/pr-test.yml
vendored
8
.github/workflows/pr-test.yml
vendored
|
|
@ -27,7 +27,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
go: [1.18]
|
go: [1.18.2]
|
||||||
db: [MySQL8.0, MySQL5.7, SQLite3]
|
db: [MySQL8.0, MySQL5.7, SQLite3]
|
||||||
if: >
|
if: >
|
||||||
${{ github.event.workflow_run.event == 'pull_request' &&
|
${{ github.event.workflow_run.event == 'pull_request' &&
|
||||||
|
|
@ -135,15 +135,13 @@ jobs:
|
||||||
password: ${{ secrets.UNIT_PASS }}
|
password: ${{ secrets.UNIT_PASS }}
|
||||||
|
|
||||||
- name: Setup Go ${{ matrix.go }}
|
- name: Setup Go ${{ matrix.go }}
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v3
|
||||||
with:
|
with:
|
||||||
go-version: ${{ matrix.go }}
|
go-version: ${{ matrix.go }}
|
||||||
|
|
||||||
- name: Setup Go Tools
|
- name: Setup Go Tools
|
||||||
run: |
|
run: |
|
||||||
if [[ "${GO111MODULE}" = "on" ]]; then go mod download; fi
|
make tools
|
||||||
if [[ "${GO111MODULE}" = "on" ]]; then export PATH="${GOPATH}/bin:${GOROOT}/bin:${PATH}"; fi
|
|
||||||
if [[ "${GO111MODULE}" = "on" ]]; then make tools; fi
|
|
||||||
|
|
||||||
- name: Setup ENV & Host
|
- name: Setup ENV & Host
|
||||||
env:
|
env:
|
||||||
|
|
|
||||||
10
.github/workflows/release-linux.yml
vendored
10
.github/workflows/release-linux.yml
vendored
|
|
@ -14,7 +14,7 @@ jobs:
|
||||||
release:
|
release:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
go: [1.18]
|
go: [1.18.2]
|
||||||
runs-on: "ubuntu-latest"
|
runs-on: "ubuntu-latest"
|
||||||
steps:
|
steps:
|
||||||
- name: Arm Build
|
- name: Arm Build
|
||||||
|
|
@ -83,17 +83,13 @@ jobs:
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Setup Go ${{ matrix.go }}
|
- name: Setup Go ${{ matrix.go }}
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v3
|
||||||
with:
|
with:
|
||||||
go-version: ${{ matrix.go }}
|
go-version: ${{ matrix.go }}
|
||||||
|
|
||||||
- name: Setup Go Tools
|
- name: Setup Go Tools
|
||||||
run: |
|
run: |
|
||||||
if [[ "${GO111MODULE}" = "on" ]]; then go mod download; fi
|
make tools
|
||||||
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/...
|
|
||||||
|
|
||||||
- name: Make Artifacts Linux
|
- name: Make Artifacts Linux
|
||||||
run: |
|
run: |
|
||||||
|
|
|
||||||
10
.github/workflows/release-macos.yml
vendored
10
.github/workflows/release-macos.yml
vendored
|
|
@ -14,7 +14,7 @@ jobs:
|
||||||
release:
|
release:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
go: [1.18]
|
go: [1.18.2]
|
||||||
runs-on: "macos-11"
|
runs-on: "macos-11"
|
||||||
steps:
|
steps:
|
||||||
- name: Install coscmd
|
- name: Install coscmd
|
||||||
|
|
@ -75,17 +75,13 @@ jobs:
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Setup Go ${{ matrix.go }}
|
- name: Setup Go ${{ matrix.go }}
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v3
|
||||||
with:
|
with:
|
||||||
go-version: ${{ matrix.go }}
|
go-version: ${{ matrix.go }}
|
||||||
|
|
||||||
- name: Setup Go Tools
|
- name: Setup Go Tools
|
||||||
run: |
|
run: |
|
||||||
if [[ "${GO111MODULE}" = "on" ]]; then go mod download; fi
|
make tools
|
||||||
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/...
|
|
||||||
|
|
||||||
- name: Make Artifacts MacOS
|
- name: Make Artifacts MacOS
|
||||||
run: |
|
run: |
|
||||||
|
|
|
||||||
8
.github/workflows/unit-test.yml
vendored
8
.github/workflows/unit-test.yml
vendored
|
|
@ -24,7 +24,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
go: [1.18]
|
go: [1.18.2]
|
||||||
db: [MySQL8.0, MySQL5.7, SQLite3]
|
db: [MySQL8.0, MySQL5.7, SQLite3]
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Cache
|
- name: Setup Cache
|
||||||
|
|
@ -83,15 +83,13 @@ jobs:
|
||||||
password: ${{ secrets.UNIT_PASS }}
|
password: ${{ secrets.UNIT_PASS }}
|
||||||
|
|
||||||
- name: Setup Go ${{ matrix.go }}
|
- name: Setup Go ${{ matrix.go }}
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v3
|
||||||
with:
|
with:
|
||||||
go-version: ${{ matrix.go }}
|
go-version: ${{ matrix.go }}
|
||||||
|
|
||||||
- name: Setup Go Tools
|
- name: Setup Go Tools
|
||||||
run: |
|
run: |
|
||||||
if [[ "${GO111MODULE}" = "on" ]]; then go mod download; fi
|
make tools
|
||||||
if [[ "${GO111MODULE}" = "on" ]]; then export PATH="${GOPATH}/bin:${GOROOT}/bin:${PATH}"; fi
|
|
||||||
if [[ "${GO111MODULE}" = "on" ]]; then make tools; fi
|
|
||||||
|
|
||||||
- name: Setup ENV & Host
|
- name: Setup ENV & Host
|
||||||
env:
|
env:
|
||||||
|
|
|
||||||
7
Makefile
7
Makefile
|
|
@ -76,9 +76,10 @@ misspell:
|
||||||
|
|
||||||
.PHONY: tools
|
.PHONY: tools
|
||||||
tools:
|
tools:
|
||||||
go install golang.org/x/lint/golint; \
|
go install golang.org/x/lint/golint@latest; \
|
||||||
go install github.com/client9/misspell/cmd/misspell;
|
go install github.com/client9/misspell/cmd/misspell@latest; \
|
||||||
|
go install github.com/go-bindata/go-bindata/...@latest;
|
||||||
|
|
||||||
# make plugin
|
# make plugin
|
||||||
.PHONY: plugin
|
.PHONY: plugin
|
||||||
plugin:
|
plugin:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue