-
-
Notifications
You must be signed in to change notification settings - Fork 195
97 lines (80 loc) · 2.71 KB
/
Copy pathtest.yml
File metadata and controls
97 lines (80 loc) · 2.71 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
name: Test
# Replaces the former AppVeyor (Windows) and GitLab CI (Linux) pipelines:
# build + run the full Go and Cucumber suites on both platforms.
on:
push:
branches: [v3]
pull_request:
permissions:
contents: read
jobs:
linux:
name: Test (Linux)
runs-on: ubuntu-latest
env:
CGO_ENABLED: "1" # required for the tree-sitter parsers
BUNDLE_GEMFILE: ${{ github.workspace }}/testdata/Gemfile
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0 # tags, for the version ldflag in `make build`
- uses: actions/setup-go@v6
with:
go-version: "1.25.7"
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.3"
- uses: actions/setup-node@v4
with:
node-version: "20"
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: "17"
- name: Install documentation toolchain
run: |
sudo apt-get -qq update
sudo apt-get install -y xsltproc
python -m pip install --upgrade docutils sphinx # rst2html
gem install asciidoctor
npm install -g mdx2vast
curl -fsSL -o dita-ot-3.6.zip \
https://github.com/dita-ot/dita-ot/releases/download/3.6/dita-ot-3.6.zip
unzip -q dita-ot-3.6.zip
echo "$PWD/dita-ot-3.6/bin" >> "$GITHUB_PATH"
- name: Setup (bundle install)
run: make setup
- name: Build
run: make build os=linux exe=vale
- name: Test
run: |
export PATH="$PWD/bin:$PATH"
make test
windows:
name: Test (Windows)
runs-on: windows-latest
defaults:
run:
shell: bash # use the runner's Git bash for all steps
env:
CGO_ENABLED: "1" # required for the tree-sitter parsers
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- uses: actions/setup-go@v6
with:
go-version: "1.25.7"
- name: Build
run: go build -o bin/vale.exe ./cmd/vale
# NOTE: The Cucumber suite runs on Linux only. Its aruba -> childprocess ->
# ffi stack can't spawn processes on modern Windows + Ruby 3.x (every step
# fails with `ChildProcess::Error: Unknown error`); AppVeyor only managed
# it on the now-unavailable Ruby 2.4. Windows still covers the build
# (including CGO/tree-sitter) and the Go unit tests -- which is where the
# Windows-specific behavior (path handling, etc.) actually lives.
- name: Test (Go)
run: go test ./internal/core ./internal/lint ./internal/check ./internal/nlp ./internal/glob ./cmd/vale