Adde gitea workflow: tests
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 57s
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 57s
This commit is contained in:
9
.gitea/workflows/Dockerfile_tests
Normal file
9
.gitea/workflows/Dockerfile_tests
Normal 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"]
|
30
.gitea/workflows/tests.yml
Normal file
30
.gitea/workflows/tests.yml
Normal 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 }}"
|
||||
|
Reference in New Issue
Block a user