From da41ec3e84ce963a7c0c8bbdb6d19f5d0f41aaa6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Schw=C3=B6rer?= Date: Wed, 11 Oct 2023 15:35:13 +0200 Subject: [PATCH] run CICD tests without doker workaround --- .gitea/workflows/Dockerfile_tests | 9 --------- .gitea/workflows/tests.yml | 24 +++++++++++++++--------- 2 files changed, 15 insertions(+), 18 deletions(-) delete mode 100644 .gitea/workflows/Dockerfile_tests diff --git a/.gitea/workflows/Dockerfile_tests b/.gitea/workflows/Dockerfile_tests deleted file mode 100644 index ba6ae3a..0000000 --- a/.gitea/workflows/Dockerfile_tests +++ /dev/null @@ -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"] diff --git a/.gitea/workflows/tests.yml b/.gitea/workflows/tests.yml index 22fabbc..a69d4de 100644 --- a/.gitea/workflows/tests.yml +++ b/.gitea/workflows/tests.yml @@ -10,21 +10,27 @@ on: [push] jobs: run_tests: - name: Run goext test-suite + name: Run goext test-suite runs-on: bfb-cicd-latest steps: - name: Check out code uses: actions/checkout@v3 - - name: Build test docker - id: build_docker - run: echo "DOCKER_IMG_ID=$(docker build -q . -f .gitea/workflows/Dockerfile_tests || echo __err_build__)" >> $GITHUB_OUTPUT + - name: Setup go + uses: actions/setup-go@v4 + 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 - run: docker run --rm "${{ steps.build_docker.outputs.DOCKER_IMG_ID }}" - - - name: Cleanup - if: always() - run: docker image rm "${{ steps.build_docker.outputs.DOCKER_IMG_ID }}" + run: cd "${{ gitea.workspace }}" && make test