Skip to content

Commit 3590389

Browse files
committed
chore: CI
1 parent 7205fef commit 3590389

File tree

2 files changed

+92
-0
lines changed

2 files changed

+92
-0
lines changed

.github/workflows/ci.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
name: CI
3+
on: [push]
4+
5+
permissions:
6+
contents: read
7+
8+
jobs:
9+
golangci:
10+
name: lint
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v5
14+
- uses: actions/setup-go@v5
15+
with:
16+
go-version-file: 'go.mod'
17+
- name: golangci-lint
18+
uses: golangci/golangci-lint-action@v8
19+
with:
20+
version: v2.4
21+
22+
tidy:
23+
name: Tidy
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v5
27+
- uses: actions/setup-go@v5
28+
with:
29+
go-version-file: 'go.mod'
30+
- name: Check if mods are tidy
31+
run: make check-tidy
32+
33+
test:
34+
name: Test
35+
runs-on: ubuntu-latest
36+
steps:
37+
- uses: actions/checkout@v5
38+
- uses: actions/setup-go@v5
39+
with:
40+
go-version-file: 'go.mod'
41+
- name: Run tests
42+
run: make test
43+
env:
44+
TESTARGS: "-covermode=atomic -coverprofile=./coverage.out"
45+
- run: go tool cover -html=coverage.out -o=coverage.html
46+
- name: Upload coverage report to artifacts
47+
uses: actions/upload-artifact@v4
48+
with:
49+
name: coverage-report
50+
path: |
51+
coverage.out
52+
coverage.html
53+
if-no-files-found: error

.github/workflows/docs.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Docs
2+
on: [pull_request]
3+
4+
jobs:
5+
vale:
6+
name: Vale Lint
7+
runs-on: arc-amd64
8+
steps:
9+
- uses: actions/checkout@v5
10+
with:
11+
fetch-depth: 0
12+
sparse-checkout: |
13+
.vale.ini
14+
resources/vale-styles
15+
README.md
16+
docs/
17+
- uses: errata-ai/vale-action@v2
18+
with:
19+
# https://github.com/errata-ai/vale-action/issues/123
20+
files: "README.md,docs/"
21+
separator: ","
22+
reporter: github-pr-annotations
23+
fail_on_error: true
24+
env:
25+
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
27+
markdown:
28+
name: Markdown Lint
29+
runs-on: arc-amd64
30+
steps:
31+
- uses: actions/checkout@v5
32+
with:
33+
sparse-checkout: |
34+
README.md
35+
docs/
36+
- uses: DavidAnson/markdownlint-cli2-action@v20
37+
with:
38+
globs: "README.md,docs/**/*.md"
39+
separator: ","

0 commit comments

Comments
 (0)