bats image
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user