-
Notifications
You must be signed in to change notification settings - Fork 0
/
vai.yaml
54 lines (46 loc) · 1.29 KB
/
vai.yaml
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
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2024-Present Harry Randazzo
# yaml-language-server: $schema=vai.schema.json
test:
- run: |
go test -race -covermode=atomic -coverprofile=coverage.out -failfast -timeout 3m ./... -short="$SHORT"
with:
short: input || false
test-short:
- uses: test
with:
short: true
view-cov:
- run: go tool cover -html=coverage.out
clean:
- run: rm -r bin/ || true
- run: rm coverage.out || true
lint:
- run: golangci-lint run ./...
hello-world:
- run: echo "Hello, World!"
benchmark:
- run: hyperfine './bin/vai hello-world' 'make hello-world' -N --warmup 10
bump-and-tag:
- run: |
git fetch --tags --quiet
echo latest=$(git describe --tags $(git rev-list --tags --max-count=1)) >> $VAI_OUTPUT
id: fetch-tags
- eval: |
fmt := import("fmt")
semver := import("semver")
version := semver.new_version(latest)
version.patch += 1
version.prerelease = ""
version.metadata = ""
next := semver.to_string(version)
fmt.println(next)
vai_output["next"] = next
with:
latest: steps["fetch-tags"].latest
id: bump-version
- run: |
git tag -a "$NEXT" -sm "$NEXT" && \
git push origin "$NEXT"
with:
next: steps["bump-version"].next