-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (27 loc) · 812 Bytes
/
ci.yaml
File metadata and controls
33 lines (27 loc) · 812 Bytes
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
name: CI
on:
push:
branches:
- main # Trigger on push to the main branch
pull_request:
branches:
- main # Trigger on pull request to the main branch
jobs:
test:
runs-on: ubuntu-latest # Run on the latest Ubuntu environment
steps:
- name: Checkout code
uses: actions/checkout@v3 # Check out the repository code
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '1.24' # Set the Go version (adjust if necessary)
- name: Cache Go modules
uses: actions/cache@v3
with:
path: ~/.cache/go-build
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-mod-
- name: Run tests
run: go test -v ./... # Run tests with verbose output