Files
gitea-ci-library/.gitea/workflows/example-bats-tests.yml
T
moilanik 31748e98cc
CI Feature / Load example-gitea-env.conf to pipeline env (push) Successful in 24s
unit-tests Link to Bats reports
CI Feature / Bats tests (push) Successful in 1m37s
acc-tests Link to Cucumber reports
CI Feature / Cucumber tests (push) Successful in 1m8s
CI Feature / Report Summary (push) Successful in 5s
uusi report logiikka
2026-06-18 06:19:58 +03:00

49 lines
1.2 KiB
YAML

name: Bats Tests
on:
workflow_call:
inputs:
env_json:
required: true
type: string
bats-image:
required: true
type: string
secrets:
GITEA_TOKEN:
required: true
GIT_PAGES_PUBLISH_TOKEN:
required: true
env:
GITEA_API_URL: ${{ fromJson(inputs.env_json).GITEA_API_URL }}
GIT_PAGES_URL: ${{ fromJson(inputs.env_json).GIT_PAGES_URL }}
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
GIT_PAGES_PUBLISH_TOKEN: ${{ secrets.GIT_PAGES_PUBLISH_TOKEN }}
jobs:
bats:
runs-on: ubuntu-latest
container:
image: ${{ inputs.bats-image }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: niko/gitea-ci-library
path: .ci
- name: Run bats tests
run: |
mkdir -p reports/bats
bashcov -- bats tests/ > reports/bats/results.txt 2>&1
- name: Post-process reports
if: always()
run: |
bash .ci/.gitea/scripts/bats-coverage.sh reports/bats
bash .ci/.gitea/scripts/bats-report.sh reports/bats
- name: Report
if: always()
run: bash .ci/scripts/ci-report.sh "Bats test report" unit-tests bats