run CICD tests without doker workaround
Some checks failed
Build Docker and Deploy / Run goext test-suite (push) Failing after 21s

This commit is contained in:
Mike Schwörer 2023-10-11 15:35:13 +02:00
parent 592fae25af
commit 2f3c48dfa9
Signed by: Mikescher
GPG Key ID: D3C7172E0A70F8CF
2 changed files with 15 additions and 18 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:
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