bats image
ci-tests Tests passed
CI / feature (push) Failing after 39s
CI / main (push) Has been skipped

This commit is contained in:
moilanik
2026-06-12 17:28:52 +03:00
parent 36caf609ec
commit 9db86d918d
2 changed files with 12 additions and 7 deletions
+8 -7
View File
@@ -1,6 +1,10 @@
name: Build Feature
on:
workflow_call:
inputs:
bats-image:
required: false
type: string
jobs:
pipeline:
@@ -17,17 +21,14 @@ jobs:
repository: niko/gitea-ci-library
path: .ci
- name: Install bats
run: |
sudo apt-get update
sudo apt-get install -y bats
- name: Bats tests
continue-on-error: true
run: |
mkdir -p "reports/${GITHUB_SHA:0:8}/bats"
bats --formatter junit tests/*.bats > "reports/${GITHUB_SHA:0:8}/bats/junit.xml" 2>&1 || \
bats tests/*.bats > "reports/${GITHUB_SHA:0:8}/bats/results.txt" 2>&1
docker run --rm -v "$PWD:/code" ${{ inputs.bats-image }} /code/tests/*.bats > "reports/${GITHUB_SHA:0:8}/bats/results.txt" 2>&1 || true
if [ -f "tests/*.bats" ]; then
docker run --rm -v "$PWD:/code" ${{ inputs.bats-image }} --formatter junit /code/tests/*.bats > "reports/${GITHUB_SHA:0:8}/bats/junit.xml" 2>&1 || true
fi
- name: Cucumber tests
continue-on-error: true