jx/.gitea/workflows/test.yaml
Matthew Rich 7e5f7411d4
Some checks failed
Declarative Tests / test (push) Failing after 49s
debug generate coverage report
2024-03-23 13:43:24 -07:00

42 lines
1.3 KiB
YAML

name: Declarative Tests
run-name: ${{ gitea.actor }} testing
on:
- push
- workflow_dispatch
- issue_comment
jobs:
test:
runs-on: ubuntu-latest
container:
image: registry.cv.mazarbul.net/declarative/build-golang:1.21.1-alpine-x86_64
env:
GOPATH: /
SSH_AUTH_SOCK: /tmp/ssh.sock
ENVIRONMENT: dev
volumes:
- ${{ env.HOME }}/.ssh/known_hosts:/root/.ssh/known_hosts
- ${{ env.SSH_AUTH_SOCK }}:/tmp/ssh.sock
- /etc/gitconfig:/etc/gitconfig
- /etc/ssl/certs:/etc/ssl/certs
- ${{ vars.GITEA_WORKSPACE }}:/go/src
options: --cpus 1
steps:
- run: apk add --no-cache nodejs
- name: Check out repository code
uses: actions/checkout@v3
- run: echo "The ${{ gitea.repository }} repository has been cloned to the runner."
- run: echo "The workflow is now ready to test your code on the runner."
- name: Run tests
run: |
go test -coverprofile=artifacts/coverage.profile ./...
- name: debug coverage report
run: |
echo $GITEA_STEP_SUMMARY
cat artifacts/coverage.profile
- run: echo "This job's status is ${{ job.status }}."
- name: coverage report
run: |
cat artifacts/coverage.profile >> $GITEA_STEP_SUMMARY
- run: echo "This job's status is ${{ job.status }}."