Skip to content

Commit 3a59a17

Browse files
committed
chore: consolidate CI
Signed-off-by: Joseph Kato <joseph@jdkato.io>
1 parent 88926b9 commit 3a59a17

3 files changed

Lines changed: 138 additions & 10 deletions

File tree

.github/workflows/codeql.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ name: "CodeQL"
22

33
on:
44
push:
5-
branches: [ 'v2' ]
5+
branches: [ 'v3' ]
66
pull_request:
77
# The branches below must be a subset of the branches above
8-
branches: [ 'v2' ]
8+
branches: [ 'v3' ]
99
schedule:
1010
- cron: '14 15 * * 3'
1111

@@ -27,11 +27,11 @@ jobs:
2727

2828
steps:
2929
- name: Checkout repository
30-
uses: actions/checkout@v3
30+
uses: actions/checkout@v5
3131

3232
# Initializes the CodeQL tools for scanning.
3333
- name: Initialize CodeQL
34-
uses: github/codeql-action/init@v2
34+
uses: github/codeql-action/init@v3
3535
with:
3636
languages: ${{ matrix.language }}
3737
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -45,7 +45,7 @@ jobs:
4545
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
4646
# If this step fails, then you should remove it and run the build manually (see below)
4747
- name: Autobuild
48-
uses: github/codeql-action/autobuild@v2
48+
uses: github/codeql-action/autobuild@v3
4949

5050
# ℹ️ Command-line programs to run using the OS shell.
5151
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -58,6 +58,6 @@ jobs:
5858
# ./location_of_script_within_repo/buildscript.sh
5959

6060
- name: Perform CodeQL Analysis
61-
uses: github/codeql-action/analyze@v2
61+
uses: github/codeql-action/analyze@v3
6262
with:
6363
category: "/language:${{matrix.language}}"

.github/workflows/main.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ jobs:
77
runs-on: ubuntu-latest
88
steps:
99
- name: Checkout
10-
uses: actions/checkout@v4
10+
uses: actions/checkout@v5
1111
with:
1212
fetch-depth: 0
1313

1414
- name: Set up Go
15-
uses: actions/setup-go@v4
15+
uses: actions/setup-go@v6
1616
with:
17-
go-version: "1.23"
17+
go-version: "1.25.7"
1818

1919
- name: Setup release environment
2020
run: |-
@@ -29,7 +29,7 @@ jobs:
2929
name: runner / vale
3030
runs-on: ubuntu-latest
3131
steps:
32-
- uses: actions/checkout@v4
32+
- uses: actions/checkout@v5
3333
- uses: errata-ai/vale-action@v2.1.1
3434
with:
3535
files: README.md

.github/workflows/test.yml

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
name: Test
2+
3+
# Replaces the former AppVeyor (Windows) and GitLab CI (Linux) pipelines:
4+
# build + run the full Go and Cucumber suites on both platforms.
5+
6+
on:
7+
push:
8+
branches: [v3]
9+
pull_request:
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
linux:
16+
name: Test (Linux)
17+
runs-on: ubuntu-latest
18+
env:
19+
CGO_ENABLED: "1" # required for the tree-sitter parsers
20+
BUNDLE_GEMFILE: ${{ github.workspace }}/testdata/Gemfile
21+
steps:
22+
- uses: actions/checkout@v5
23+
with:
24+
fetch-depth: 0 # tags, for the version ldflag in `make build`
25+
26+
- uses: actions/setup-go@v6
27+
with:
28+
go-version: "1.25.7"
29+
30+
- uses: ruby/setup-ruby@v1
31+
with:
32+
ruby-version: "3.3"
33+
34+
- uses: actions/setup-node@v4
35+
with:
36+
node-version: "20"
37+
38+
- uses: actions/setup-python@v5
39+
with:
40+
python-version: "3.x"
41+
42+
- uses: actions/setup-java@v4
43+
with:
44+
distribution: temurin
45+
java-version: "17"
46+
47+
- name: Install documentation toolchain
48+
run: |
49+
sudo apt-get -qq update
50+
sudo apt-get install -y xsltproc
51+
python -m pip install --upgrade docutils sphinx # rst2html
52+
gem install asciidoctor
53+
npm install -g mdx2vast
54+
curl -fsSL -o dita-ot-3.6.zip \
55+
https://github.com/dita-ot/dita-ot/releases/download/3.6/dita-ot-3.6.zip
56+
unzip -q dita-ot-3.6.zip
57+
echo "$PWD/dita-ot-3.6/bin" >> "$GITHUB_PATH"
58+
59+
- name: Setup (bundle install)
60+
run: make setup
61+
62+
- name: Build
63+
run: make build os=linux exe=vale
64+
65+
- name: Test
66+
run: |
67+
export PATH="$PWD/bin:$PATH"
68+
make test
69+
70+
windows:
71+
name: Test (Windows)
72+
runs-on: windows-latest
73+
defaults:
74+
run:
75+
shell: bash # use the runner's Git bash for all steps
76+
env:
77+
CGO_ENABLED: "1" # required for the tree-sitter parsers
78+
BUNDLE_GEMFILE: ${{ github.workspace }}/testdata/Gemfile
79+
steps:
80+
- uses: actions/checkout@v5
81+
with:
82+
fetch-depth: 0
83+
84+
- uses: actions/setup-go@v6
85+
with:
86+
go-version: "1.25.7"
87+
88+
- uses: ruby/setup-ruby@v1
89+
with:
90+
ruby-version: "3.3"
91+
92+
- uses: actions/setup-node@v4
93+
with:
94+
node-version: "20"
95+
96+
- uses: actions/setup-python@v5
97+
with:
98+
python-version: "3.x"
99+
100+
- uses: actions/setup-java@v4
101+
with:
102+
distribution: temurin
103+
java-version: "17"
104+
105+
- name: Install documentation toolchain
106+
run: |
107+
choco install --no-progress -y xsltproc
108+
# Git ships a non-functional xsltproc; drop it so the choco one wins.
109+
rm -f "/c/Program Files/Git/usr/bin/xsltproc.exe" || true
110+
python -m pip install --upgrade docutils sphinx # rst2html
111+
gem install asciidoctor
112+
npm install -g mdx2vast
113+
curl -fsSL -o dita-ot-3.6.zip \
114+
https://github.com/dita-ot/dita-ot/releases/download/3.6/dita-ot-3.6.zip
115+
unzip -q dita-ot-3.6.zip
116+
echo "$PWD/dita-ot-3.6/bin" >> "$GITHUB_PATH"
117+
118+
- name: Setup (bundle install)
119+
run: cd testdata && bundle install
120+
121+
- name: Build
122+
run: go build -o bin/vale.exe ./cmd/vale
123+
124+
- name: Test
125+
run: |
126+
export PATH="$PWD/bin:$PATH"
127+
go test ./internal/core ./internal/lint ./internal/check ./internal/nlp ./internal/glob ./cmd/vale
128+
cd testdata && cucumber --format progress

0 commit comments

Comments
 (0)