Compare commits

...

2 Commits

Author SHA1 Message Date
07cbcf5a0a v0.0.287 fix bug in confext::ApplyEnvOverrides if a struct env key exists in the os.env
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 1m37s
2023-10-12 10:02:42 +02:00
da41ec3e84 run CICD tests without doker workaround
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 1m37s
2023-10-11 15:50:09 +02:00
4 changed files with 22 additions and 28 deletions

View File

@@ -1,9 +0,0 @@
FROM golang:latest
RUN apt install -y make curl python3 && go install gotest.tools/gotestsum@latest
COPY . /source
WORKDIR /source
CMD ["make", "test"]

View File

@@ -10,21 +10,27 @@ on: [push]
jobs: jobs:
run_tests: run_tests:
name: Run goext test-suite name: Run goext test-suite
runs-on: bfb-cicd-latest runs-on: bfb-cicd-latest
steps: steps:
- name: Check out code - name: Check out code
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Build test docker - name: Setup go
id: build_docker uses: actions/setup-go@v4
run: echo "DOCKER_IMG_ID=$(docker build -q . -f .gitea/workflows/Dockerfile_tests || echo __err_build__)" >> $GITHUB_OUTPUT with:
go-version-file: '${{ gitea.workspace }}/go.mod'
- name: Setup packages
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: curl python3
version: 1.0
- name: go version
run: go version
- name: Run tests - name: Run tests
run: docker run --rm "${{ steps.build_docker.outputs.DOCKER_IMG_ID }}" run: cd "${{ gitea.workspace }}" && make test
- name: Cleanup
if: always()
run: docker image rm "${{ steps.build_docker.outputs.DOCKER_IMG_ID }}"

View File

@@ -41,12 +41,12 @@ func processEnvOverrides(rval reflect.Value, delim string, prefix string) error
continue continue
} }
if rvfield.Kind() == reflect.Struct { envkey, found := rsfield.Tag.Lookup("env")
if !found || envkey == "-" {
continue
}
envkey, found := rsfield.Tag.Lookup("env") if rvfield.Kind() == reflect.Struct && rvfield.Type() != reflect.TypeOf(time.UnixMilli(0)) {
if !found || envkey == "-" {
continue
}
subPrefix := prefix subPrefix := prefix
if envkey != "" { if envkey != "" {
@@ -57,10 +57,7 @@ func processEnvOverrides(rval reflect.Value, delim string, prefix string) error
if err != nil { if err != nil {
return err return err
} }
}
envkey := rsfield.Tag.Get("env")
if envkey == "" || envkey == "-" {
continue continue
} }

View File

@@ -1,5 +1,5 @@
package goext package goext
const GoextVersion = "0.0.286" const GoextVersion = "0.0.287"
const GoextVersionTimestamp = "2023-10-11T11:27:18+0200" const GoextVersionTimestamp = "2023-10-12T10:02:42+0200"