mirror of
https://gitee.com/johng/gf
synced 2026-06-06 16:21:40 +08:00
feat: add submodule examples (#4137)
This commit is contained in:
13
.github/workflows/ci-main.sh
vendored
13
.github/workflows/ci-main.sh
vendored
@ -2,6 +2,9 @@
|
||||
|
||||
coverage=$1
|
||||
|
||||
# update code of submodules
|
||||
make subup
|
||||
|
||||
# find all path that contains go.mod.
|
||||
for file in `find . -name go.mod`; do
|
||||
dirpath=$(dirname $file)
|
||||
@ -18,16 +21,16 @@ for file in `find . -name go.mod`; do
|
||||
continue 1
|
||||
fi
|
||||
|
||||
# Check if it's a contrib directory or example directory
|
||||
if [[ $dirpath =~ "/contrib/" ]] || [ "example" = $(basename $dirpath) ]; then
|
||||
# Check if it's a contrib directory or examples directory
|
||||
if [[ $dirpath =~ "/contrib/" ]] || [ "examples" = $(basename $dirpath) ]; then
|
||||
# Check if go version meets the requirement
|
||||
if ! go version | grep -qE "go${LATEST_GO_VERSION}"; then
|
||||
echo "ignore path $dirpath as go version is not ${LATEST_GO_VERSION}: $(go version)"
|
||||
continue 1
|
||||
fi
|
||||
# If it's example directory, only build without tests
|
||||
if [ "example" = $(basename $dirpath) ]; then
|
||||
echo "the example directory only needs to be built, not unit tests and coverage tests."
|
||||
# If it's examples directory, only build without tests
|
||||
if [ "examples" = $(basename $dirpath) ]; then
|
||||
echo "the examples directory only needs to be built, not unit tests and coverage tests."
|
||||
cd $dirpath
|
||||
go mod tidy
|
||||
go build ./...
|
||||
|
||||
10
.github/workflows/ci-main.yml
vendored
10
.github/workflows/ci-main.yml
vendored
@ -40,7 +40,7 @@ jobs:
|
||||
# 1. Update the `LATEST_GO_VERSION` env variable.
|
||||
# 2. Update the `Report Coverage` action.
|
||||
# 🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
|
||||
go-version: [ "1.20", "1.21", "1.22", "1.23" ]
|
||||
go-version: [ "1.22", "1.23" ]
|
||||
goarch: [ "386", "amd64" ]
|
||||
|
||||
runs-on: ubuntu-20.04
|
||||
@ -157,13 +157,9 @@ jobs:
|
||||
# Polaris backend server.
|
||||
# docker run -d --name polaris \
|
||||
# -p 8090:8090 -p 8091:8091 -p 8093:8093 -p 9090:9090 -p 9091:9091 \
|
||||
# loads/polaris-server-standalone:1.11.2
|
||||
#
|
||||
# docker run -d --name polaris \
|
||||
# -p 8090:8090 -p 8091:8091 -p 8093:8093 -p 9090:9090 -p 9091:9091 \
|
||||
# loads/polaris-standalone:v1.16.3
|
||||
# polarismesh/polaris-standalone:v1.17.2
|
||||
polaris:
|
||||
image: loads/polaris-standalone:v1.17.2
|
||||
image: polarismesh/polaris-standalone:v1.17.2
|
||||
ports:
|
||||
- 8090:8090
|
||||
- 8091:8091
|
||||
|
||||
2
.github/workflows/ci-sub.yml
vendored
2
.github/workflows/ci-sub.yml
vendored
@ -40,7 +40,7 @@ jobs:
|
||||
# When adding new go version to the list, make sure:
|
||||
# 1. Update the `LATEST_GO_VERSION` env variable.
|
||||
# 🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
|
||||
go-version: [ "1.20", "1.21", "1.22", "1.23" ]
|
||||
go-version: [ "1.22", "1.23" ]
|
||||
goarch: [ "386", "amd64" ]
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
2
.github/workflows/nacos/docker-compose.yml
vendored
2
.github/workflows/nacos/docker-compose.yml
vendored
@ -17,7 +17,7 @@ services:
|
||||
retries: 10
|
||||
|
||||
initializer:
|
||||
image: loads/curl:latest
|
||||
image: alpine/curl:latest
|
||||
depends_on:
|
||||
nacos:
|
||||
condition: service_healthy
|
||||
|
||||
Reference in New Issue
Block a user