chore(deps): bump golang from 1.24.3 to 1.24.4 (#196) #20
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: action-test (source version) | |
on: [push] | |
jobs: | |
test: | |
name: test | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: setup go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
- name: generate test coverage | |
run: go test ./... -coverprofile=./cover.out -covermode=atomic | |
## Test 1 | |
- name: "test: total coverage 0% (config)" | |
uses: ./action/source/. | |
id: test-1 | |
with: | |
version: ${{ github.sha }} | |
config: ./.github/workflows/testdata/zero.yml | |
- name: "check: test output values" | |
if: ${{ steps.test-1.outputs.total-coverage == '' || steps.test-1.outputs.badge-text == '' || steps.test-1.outputs.badge-color == '' || steps.test-1.outputs.report == '' }} | |
run: echo "Previous step should have output values" && exit 1 | |
## Test 2 | |
- name: "test: total coverage 100% (config)" | |
uses: ./action/source/. | |
id: test-2 | |
continue-on-error: true | |
with: | |
version: ${{ github.sha }} | |
config: ./.github/workflows/testdata/total100.yml | |
- name: "check: test should have failed" | |
if: steps.test-2.outcome != 'failure' | |
run: echo "Previous step should have failed" && exit 1 | |
- name: "check: test output values" | |
if: ${{ steps.test-2.outputs.total-coverage == '' || steps.test-2.outputs.badge-text == '' || steps.test-2.outputs.badge-color == '' }} | |
run: echo "Previous step should have output values" && exit 1 | |
## Test 3 | |
- name: "test: total coverage 0% (inputs)" | |
uses: ./action/source/. | |
id: test-3 | |
with: | |
version: ${{ github.sha }} | |
profile: cover.out | |
threshold-file: 0 | |
threshold-package: 0 | |
threshold-total: 0 | |
## Test 4 | |
- name: "test: total coverage 100% (inputs)" | |
uses: ./action/source/. | |
id: test-4 | |
continue-on-error: true | |
with: | |
version: ${{ github.sha }} | |
profile: cover.out | |
threshold-file: 0 | |
threshold-package: 0 | |
threshold-total: 100 | |
- name: "check: test should have failed" | |
if: steps.test-4.outcome != 'failure' | |
run: echo "Previous step should have failed" && exit 1 | |
## Test 5 | |
- name: "test: override config" | |
uses: ./action/source/. | |
id: test-5 | |
with: | |
version: ${{ github.sha }} | |
config: ./.github/workflows/testdata/total100.yml | |
threshold-file: 0 | |
threshold-package: 0 | |
threshold-total: 0 | |
## Test 6 | |
- name: "test: debug output" | |
uses: ./action/source/. | |
id: test-6 | |
continue-on-error: true | |
with: | |
version: ${{ github.sha }} | |
profile: unexistant-profile.out | |
debug: true | |
threshold-file: 0 | |
threshold-package: 0 | |
threshold-total: 100 | |
- name: "check: test should have failed" | |
if: steps.test-6.outcome != 'failure' | |
run: echo "Previous step should have failed" && exit 1 |