ci: added unit test in workflow

This commit is contained in:
Marvin Zhang
2024-10-20 18:03:19 +08:00
parent cecf4dfd1d
commit 76793c0c47
2 changed files with 23 additions and 3 deletions

View File

@@ -83,11 +83,31 @@ jobs:
[ "$VERSION" == "main" ] && VERSION=latest
echo "::set-output name=version::$VERSION"
build_backend:
test_backend:
needs: [ setup ]
if: needs.setup.outputs.is_matched_backend == '1'
runs-on: ubuntu-latest
services:
mongo:
image: mongo:5
ports:
- 27017:27017
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.22'
- name: Run tests
run: |
cd $IMAGE_PATH_CRAWLAB_BACKEND/core
go test ./... -v
build_backend:
needs: [ setup, test_backend ]
if: needs.setup.outputs.is_matched_backend == '1'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get changed files

View File

@@ -1,6 +1,6 @@
# Crawlab Configuration File
edition: global.edition.community
version: v0.6.3
version: v0.7.0
mongo:
host: localhost