-
Notifications
You must be signed in to change notification settings - Fork 103
98 lines (77 loc) · 2.23 KB
/
Copy pathci.yml
File metadata and controls
98 lines (77 loc) · 2.23 KB
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: CI
on:
push:
branches:
- main
- v2
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
test:
name: Test and build
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v5
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
cache: true
- name: Download modules
run: go mod download
- name: Run tests
run: go test ./...
- name: Run integration tests
run: go test -tags=integration ./...
- name: Build binaries
run: |
go build ./cmd/restish
go build ./cmd/restish-bulk
go build ./cmd/restish-csv
go build ./cmd/restish-mcp
go build ./cmd/restish-pkcs11
docs:
name: Docs
runs-on: ubuntu-latest
env:
HUGO_VERSION: "0.160.0"
NODE_VERSION: "24"
steps:
- name: Check out repository
uses: actions/checkout@v5
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
cache: true
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
cache: npm
cache-dependency-path: site/package-lock.json
- name: Install Hugo
run: |
mkdir -p "${HOME}/.local/hugo"
curl -sL "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz" \
| tar -xz -C "${HOME}/.local/hugo"
echo "${HOME}/.local/hugo" >> "${GITHUB_PATH}"
- name: Install Node.js dependencies
working-directory: site
run: npm ci
- name: Check generated docs
run: go run ./cmd/restish-docgen --check
- name: Generate social preview images
working-directory: site
run: npm run social-images
- name: Build docs site
run: |
hugo --source site --quiet --gc --minify \
--cacheDir "${{ runner.temp }}/hugo_cache"
- name: Check docs links
run: scripts/check-doc-links.rb
- name: Check docs examples
run: scripts/check-doc-examples.rb