Run Tests #19
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: Run Tests | |
on: | |
workflow_dispatch: # Allow manual execution | |
push: | |
tags: | |
- 'v*' # Trigger on version tags | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
# Go versions to test against | |
go-version: [ "1.21", "1.22", "1.23", "1.24" ] | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Set up Go ${{ matrix.go-version }} | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Install Dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y make | |
make install-deps | |
continue-on-error: false | |
- name: Run Tests and Generate Coverage Report | |
run: | | |
make test # Generates a coverage.txt file for Codecov | |
continue-on-error: false | |
- name: Upload Coverage Reports to Codecov | |
uses: codecov/codecov-action@v5 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
continue-on-error: false # Set to true to prevent failing the build if Codecov fails |