bats image
This commit is contained in:
@@ -1,6 +1,10 @@
|
|||||||
name: Build Feature
|
name: Build Feature
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
bats-image:
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pipeline:
|
pipeline:
|
||||||
@@ -17,17 +21,14 @@ jobs:
|
|||||||
repository: niko/gitea-ci-library
|
repository: niko/gitea-ci-library
|
||||||
path: .ci
|
path: .ci
|
||||||
|
|
||||||
- name: Install bats
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install -y bats
|
|
||||||
|
|
||||||
- name: Bats tests
|
- name: Bats tests
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
run: |
|
run: |
|
||||||
mkdir -p "reports/${GITHUB_SHA:0:8}/bats"
|
mkdir -p "reports/${GITHUB_SHA:0:8}/bats"
|
||||||
bats --formatter junit tests/*.bats > "reports/${GITHUB_SHA:0:8}/bats/junit.xml" 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
|
||||||
bats tests/*.bats > "reports/${GITHUB_SHA:0:8}/bats/results.txt" 2>&1
|
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
|
- name: Cucumber tests
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|||||||
@@ -9,8 +9,12 @@ jobs:
|
|||||||
if: github.ref != 'refs/heads/main'
|
if: github.ref != 'refs/heads/main'
|
||||||
uses: niko/gitea-ci-library/.gitea/workflows/build-feature.yml@plan/0003-alkaa-käyttämään-itseään-commit-raportti
|
uses: niko/gitea-ci-library/.gitea/workflows/build-feature.yml@plan/0003-alkaa-käyttämään-itseään-commit-raportti
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
with:
|
||||||
|
bats-image: bats/bats:latest
|
||||||
|
|
||||||
main:
|
main:
|
||||||
if: github.ref == 'refs/heads/main'
|
if: github.ref == 'refs/heads/main'
|
||||||
uses: niko/gitea-ci-library/.gitea/workflows/build-feature.yml@plan/0003-alkaa-käyttämään-itseään-commit-raportti
|
uses: niko/gitea-ci-library/.gitea/workflows/build-feature.yml@plan/0003-alkaa-käyttämään-itseään-commit-raportti
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
with:
|
||||||
|
bats-image: bats/bats:latest
|
||||||
|
|||||||
Reference in New Issue
Block a user