-
Notifications
You must be signed in to change notification settings - Fork 63
39 lines (39 loc) · 877 Bytes
/
ci.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
name: CI
on:
push:
branches:
- main
tags:
- v*
pull_request:
schedule:
- cron: 0 7 1 * *
jobs:
build:
strategy:
matrix:
go-version:
- 1.21
- oldstable
- stable
os:
- ubuntu-latest
- macos-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
cache: true
- name: Run tests
run: make test-race test-coverage test-bench
- name: Build and run
run: make && ./bin/hellogopher hello
- name: Upload binary
uses: actions/upload-artifact@v4
if: matrix.go-version == 'stable'
with:
name: binary-${{ matrix.os }}
path: bin/hellogopher
if-no-files-found: error