Files
niko 908aee9f8b
CI Main / Cucumber tests (push) Successful in 1m11s
CI Main / Bats tests (push) Successful in 1m41s
acc-tests Cucumber test report
CI Feature / Cucumber tests (push) Successful in 58s
unit-tests Bats test report
CI Feature / Bats tests (push) Successful in 1m27s
CI Feature / Report Summary (push) Successful in 4s
CI Main / Load example-gitea-env.conf to pipeline env (push) Successful in 25s
CI Main / Check existing artifact (push) Successful in 14s
ci-docker-build-push Docker build & push 0.2.12 OK
CI Main / Build & Push Docker (push) Successful in 44s
CI Main / Report Summary (push) Successful in 7s
CI Main / Move provider version tag (push) Successful in 17s
CI Feature / Load example-gitea-env.conf to pipeline env (push) Successful in 22s
job status parametrin käyttö (#25)
Co-authored-by: moilanik <niko.moilanen@tietoevry.com>
Reviewed-on: #25
2026-06-19 02:56:37 +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
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 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 }}