Improve CI Test

This commit is contained in:
Simple-Tracker 2024-09-09 15:02:38 +08:00
parent 097ce30db5
commit 7c3d9c327b
4 changed files with 23 additions and 23 deletions

21
.github/workflows/ci-test.yaml vendored Normal file
View File

@ -0,0 +1,21 @@
name: 'Dev-CI-Test'
on:
workflow_dispatch:
push:
branches: ['dev']
pull_request:
branches: ['dev']
jobs:
Dev-CI-Test:
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@v4
- name: 'Setup Go'
uses: actions/setup-go@v4
with:
go-version: '1.20.13'
- name: 'Test'
run: 'go test -v ./... -race'

View File

@ -1,21 +0,0 @@
name: 'Dev-CI-Go-Test'
on:
push:
branches: [ "dev" ]
pull_request:
branches: [ "dev" ]
jobs:
Test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20.13'
- name: Test
run: go test -v ./... -race

View File

@ -12,7 +12,7 @@ jobs:
steps:
- name: 'Checkout'
uses: 'actions/checkout@v4'
- name: Setup Docker Buildx
- name: 'Setup Docker Buildx'
uses: docker/setup-buildx-action@v3
- name: 'Login to Docker Hub'
uses: 'docker/login-action@v3'

View File

@ -63,7 +63,7 @@ jobs:
steps:
- name: 'Checkout'
uses: 'actions/checkout@v4'
- name: Set build info
- name: 'Set build info'
id: build_info
run: |
echo "tag_version=$(basename ${GITHUB_REF}) (${{ matrix.goarch == 'arm' && format('{0}, {1}v{2}', matrix.goos, matrix.goarch, matrix.goarm) || format('{0}, {1}', matrix.goos, matrix.goarch) }})" >> "${GITHUB_OUTPUT}"