Files
gitea-ci-library/.gitea/workflows/example-bats-tests.yml
T
niko bd6ed5c2c2
CI Gitea Reports Main / Config load (push) Successful in 17s
CI Main / Config load (push) Successful in 20s
CI Gitea Reports Main / Latest version (push) Successful in 17s
CI Main / Latest versio (push) Successful in 19s
ci-helm-build-push Helm push 0.2.0
CI Gitea Reports Main / Build & Push Helm chart (push) Successful in 33s
gitops/gitea-ci-library/gitea-reports GitOps: gitea-reports 0.2.0
CI Gitea Reports Main / GitOps (push) Successful in 33s
CI Gitea Reports Main / Report Summary (push) Successful in 3s
CI Main / Bats tests (push) Failing after 1m16s
CI Main / Cucumber tests (push) Failing after 1m22s
CI Main / Build & Push Docker (push) Has been skipped
CI Main / GitOps (push) Has been skipped
CI Main / Move provider version tag (push) Has been skipped
CI Main / Report Summary (push) Successful in 3s
Feature/git pages -> oma nginx perusteinen raporointipalvelu (#48)
Co-authored-by: moilanik <niko.moilanen@tietoevry.com>
Reviewed-on: #48
2026-06-28 09:10:10 +03:00

52 lines
1.3 KiB
YAML

name: Bats Tests
on:
workflow_call:
inputs:
env_json:
required: true
type: string
bats-image:
required: false
type: string
default: gitea.app.keskikuja.site/niko/ci-bats:git
secrets:
GITEA_TOKEN:
required: true
REPORTS_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 }}
REPORTS_PUBLISH_TOKEN: ${{ secrets.REPORTS_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 coverage
if: always()
run: bash .ci/.gitea/scripts/bats-coverage.sh reports/bats
- name: Post-process test report
if: always()
run: 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 ${{ job.status }}