run CICD tests without doker workaround
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 1m37s
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 1m37s
This commit is contained in:
parent
592fae25af
commit
da41ec3e84
@ -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"]
|
|
@ -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 }}"
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user