Add Hash
renv.lock field
#140
Workflow file for this run
This file contains 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: Test π§ͺ | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- reopened | |
- ready_for_review | |
branches: | |
- main | |
workflow_dispatch: | |
concurrency: | |
group: test-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
name: Test π | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
go-version: | |
- 1.21.3 | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- name: Checkout Repo π | |
uses: actions/checkout@v4 | |
- name: Setup Go πΉ | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go-version }} | |
cache: true | |
cache-dependency-path: go.sum | |
- name: Run Tests 𧨠| |
run: make test | |
- name: Check whether JUnit XML report exists π¦ | |
id: check-junit-xml | |
uses: andstor/file-existence-action@v3 | |
with: | |
files: junit-report.xml | |
- name: Publish Unit Test Summary π | |
uses: EnricoMi/publish-unit-test-result-action@v2 | |
id: test-results | |
if: steps.check-junit-xml.outputs.files_exists == 'true' && github.event_name == 'pull_request' | |
with: | |
check_name: Unit Tests Summary | |
junit_files: junit-report.xml | |
- name: Check whether coverage reports exists π | |
id: check-coverage-reports | |
uses: andstor/file-existence-action@v3 | |
with: | |
files: >- | |
coverage.xml, | |
coverage.html | |
- name: Post coverage report π | |
if: steps.check-coverage-reports.outputs.files_exists == 'true' | |
uses: insightsengineering/coverage-action@v2 | |
with: | |
path: coverage.xml | |
threshold: 80 | |
fail: false | |
publish: true | |
diff: true | |
coverage-reduction-failure: true | |
new-uncovered-statements-failure: true | |
continue-on-error: true | |
- name: Upload report πΌ | |
if: steps.check-coverage-reports.outputs.files_exists == 'true' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: coverage-report | |
path: | | |
coverage.html | |
continue-on-error: true | |
compilation: | |
name: Build π | |
strategy: | |
matrix: | |
go-version: | |
- 1.21.3 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo π | |
uses: actions/checkout@v4 | |
- name: Setup Go πΉ | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go-version }} | |
cache: true | |
cache-dependency-path: go.sum | |
- name: Check if compilation works 𧱠| |
run: make build |