Skip to content

Commit cee4407

Browse files
authoredNov 8, 2022
fix: run tests on PRs and pushes (#8)
* fix: run tests * fix: rename
1 parent c4f86bc commit cee4407

File tree

3 files changed

+36
-5
lines changed

3 files changed

+36
-5
lines changed
 

‎.github/workflows/build.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: build
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
with:
11+
fetch-depth: 0
12+
- uses: actions/setup-go@v2
13+
with:
14+
go-version: ^1
15+
check-latest: true
16+
- run: go test -cover -race -failfast ./...
17+
example:
18+
runs-on: ubuntu-latest
19+
defaults:
20+
run:
21+
working-directory: ./_examples
22+
steps:
23+
- uses: actions/checkout@v2
24+
with:
25+
fetch-depth: 0
26+
- uses: actions/setup-go@v2
27+
with:
28+
go-version: ^1
29+
check-latest: true
30+
cache: true
31+
- run: go run .

‎_examples/go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ go 1.19
55
require (
66
github.com/catppuccin/go v0.0.0-00010101000000-000000000000
77
github.com/charmbracelet/lipgloss v0.6.0
8-
github.com/muesli/termenv v0.13.0
98
)
109

1110
require (
@@ -14,6 +13,7 @@ require (
1413
github.com/mattn/go-isatty v0.0.16 // indirect
1514
github.com/mattn/go-runewidth v0.0.14 // indirect
1615
github.com/muesli/reflow v0.2.1-0.20210115123740-9e1d0d53df68 // indirect
16+
github.com/muesli/termenv v0.13.0 // indirect
1717
github.com/rivo/uniseg v0.2.0 // indirect
1818
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab // indirect
1919
)

‎_examples/main.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ import (
1010
func main() {
1111
fmt.Println()
1212
for _, flavour := range []catppuccin.Flavour{
13-
catppuccin.Mocha(),
14-
catppuccin.Frappe(),
15-
catppuccin.Macchiato(),
16-
catppuccin.Latte(),
13+
catppuccin.Mocha,
14+
catppuccin.Frappe,
15+
catppuccin.Macchiato,
16+
catppuccin.Latte,
1717
} {
1818

1919
fmt.Println(lipgloss.NewStyle().Bold(true).Render(flavour.Name() + ":"))

0 commit comments

Comments
 (0)
Please sign in to comment.