-
Notifications
You must be signed in to change notification settings - Fork 18
77 lines (56 loc) · 1.7 KB
/
build.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: build
on:
push:
branches:
- master
pull_request:
types: [assigned, opened, synchronize, reopened]
jobs:
build:
name: Build & run examples
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- name: Set up Go 1.19
uses: actions/setup-go@v5
with:
go-version: 1.22
id: go
- name: Check out code
uses: actions/checkout@master
- name: Build basic
run: go build -v ./examples/basic
- name: Run basic
run: ./basic
- name: Build chained
run: go build -v ./examples/chained
- name: Run chained
run: ./chained -name World -age 30 -awesome true
- name: Build custom-banner
run: go build -v ./examples/custom-banner
- name: Run custom-banner
run: ./custom-banner -help
- name: Build flags
run: go build -v ./examples/flags
- name: Run flags
run: ./flags -name World -age 30 -awesome true
- name: Build flags-compact
run: go build -v ./examples/flags-compact
- name: Run flags-compact
run: ./flags-compact -name World -age 30 -awesome true
- name: Build nested-subcommands
run: go build -v ./examples/nested-subcommands
- name: Run nested-subcommands top
run: ./nested-subcommands top
- name: Run nested-subcommands middle
run: ./nested-subcommands top middle
- name: Run nested-subcommands bottom
run: ./nested-subcommands top middle bottom
- name: Build subcommands
run: go build -v ./examples/subcommands
- name: Run subcommands init
run: ./subcommands init
- name: Run subcommands test
run: ./subcommands test