Repository navigation
58 lines (55 loc) · 1.92 KB
/
Copy pathci.yml
File metadata and controls
58 lines (55 loc) · 1.92 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
name: CI
on:
push:
branches: [main]
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-go@v7
with:
go-version-file: go.mod
- run: make lint
- run: make test
- run: make audit-public
- run: make build
# Cross-compile check
- run: GOOS=darwin GOARCH=arm64 go build ./cmd/shellroute
- run: GOOS=darwin GOARCH=amd64 go build ./cmd/shellroute
- run: GOOS=linux GOARCH=arm64 go build ./cmd/shellroute
upstreams:
# Layer 2 of the bring-your-own-proxy test plan: real proxy software in Docker.
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-go@v7
with:
go-version-file: go.mod
- name: Proxy software in Docker (3proxy, gost, squid, ssh -D)
run: bash scripts/test-upstreams.sh
skills:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Skill offline suite
run: bash skills/country-response-testing/scripts/tests.sh
- name: Skill frontmatter
run: |
python3 - <<'PY'
import re, pathlib
p = pathlib.Path("skills/country-response-testing/SKILL.md")
m = re.match(r"---\n(.*?)\n---\n(.+)", p.read_text(), re.S)
assert m, "no frontmatter"
fm, body = m.group(1), m.group(2)
def field(k):
r = re.search(rf"^{k}:\s*(.+?)\s*$", fm, re.M)
return r.group(1).strip("\"'") if r else None
assert field("name") == p.parent.name, "name must equal the directory name"
assert re.fullmatch(r"[a-z0-9]+(-[a-z0-9]+)*", field("name")), "name charset"
assert len(field("description")) <= 1024, "description too long"
assert field("license"), "license missing"
assert body.strip(), "empty body"
print("skill frontmatter ok")
PY