Adde gitea workflow: tests
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 57s

This commit is contained in:
2023-08-14 18:39:22 +02:00
parent f6bcdc9903
commit 14441c2378
8 changed files with 89 additions and 22 deletions

View File

@@ -0,0 +1,9 @@
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

@@ -0,0 +1,30 @@
# https://docs.gitea.com/next/usage/actions/quickstart
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
# https://docs.github.com/en/actions/learn-github-actions/contexts#github-context
name: Build Docker and Deploy
run-name: Build & Deploy ${{ gitea.ref }} on ${{ gitea.actor }}
on: [push]
jobs:
run_tests:
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: 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 }}"