generated from habedi/template-go-project
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (33 loc) · 1.19 KB
/
tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Tests
on:
workflow_dispatch: # Only enable manual runs for now
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
# Define the Go versions to test against
go-version: [ "1.21", "1.22", "1.23" ]
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 }}
# Install dependencies and run the tests
- name: Install Dependencies
run: |
sudo apt-get install -y make
make format
continue-on-error: false
- name: Run Tests and Generate Coverage Report
run: |
make test
make codecov
continue-on-error: false
# Upload the coverage report to Codecov
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}