🧪 Test #100
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
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json | |
--- | |
name: 🧪 Test | |
on: | |
pull_request: | |
branches: | |
- main | |
types: | |
- opened | |
- synchronize | |
schedule: | |
- cron: "0 2 * * *" | |
workflow_dispatch: | |
concurrency: | |
group: ${{ format('{0}-{1}-{2}-{3}-{4}', github.workflow, github.event_name, github.ref, github.base_ref || null, github.head_ref || null) }} | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
pull-requests: write | |
checks: write | |
jobs: | |
test: | |
name: 🧪 Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: ⤵️ Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: 🚧 Setup Go | |
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 | |
with: | |
go-version-file: go.mod | |
cache: false | |
- name: 🚧 Setup Task | |
uses: arduino/setup-task@b91d5d2c96a56797b48ac1e0e89220bf64044611 # v2.0.0 | |
with: | |
repo-token: ${{ github.token }} | |
- name: 🔨 Setup Test tools | |
run: task test:tools | |
- name: 🧪 Run fake tests | |
run: task test | |
- name: 📢 Publish test results | |
if: always() | |
uses: dorny/test-reporter@31a54ee7ebcacc03a09ea97a7e5465a47b84aea5 # v1.9.1 | |
with: | |
name: 📜 Test results | |
reporter: jest-junit | |
path: testresults.xml | |
- name: ⚙️ Get Coverage summary | |
uses: irongut/CodeCoverageSummary@51cc3a756ddcd398d447c044c02cb6aa83fdae95 # v1.3.0 | |
with: | |
filename: coverage.xml | |
badge: true | |
fail_below_min: false | |
format: markdown | |
hide_branch_rate: false | |
hide_complexity: false | |
indicators: true | |
output: both | |
thresholds: "40 60" | |
- name: 📢 Publish coverage results | |
run: cat code-coverage-results.md >> $GITHUB_STEP_SUMMARY | |
- name: 📤 Upload test results | |
if: always() | |
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0 | |
with: | |
name: test-results | |
path: testresults.xml | |
if-no-files-found: warn | |
overwrite: true | |
- name: 📤 Upload coverage results | |
if: always() | |
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0 | |
with: | |
name: test-coverage-results | |
path: | | |
coverage.html | |
coverage.json | |
coverage.out | |
coverage.txt | |
coverage.xml | |
code-coverage-results.md | |
if-no-files-found: warn | |
overwrite: true |