Skip to content

Commit 94762b7

Browse files
committed
Add workflow
1 parent 1a81360 commit 94762b7

File tree

6 files changed

+32
-7
lines changed

6 files changed

+32
-7
lines changed

.github/workflows/test.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Build + Test
2+
3+
on: push
4+
5+
jobs:
6+
styles:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout
10+
uses: actions/checkout@v3
11+
with:
12+
fetch-depth: 0
13+
14+
- name: Set up Go
15+
uses: actions/setup-go@v3
16+
with:
17+
go-version: "1.20"
18+
19+
- name: Install Vale
20+
run: |
21+
go install github.com/errata-ai/vale/v2/cmd/vale@latest
22+
echo 'export PATH=$PATH:$(go env GOPATH)/bin' >> $GITHUB_PATH
23+
24+
- name: Run tests
25+
run: |
26+
go test -v ./pkg

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Styles [![Build Status](https://travis-ci.org/errata-ai/styles.svg?branch=master)](https://travis-ci.org/errata-ai/styles)
1+
# Styles
22

33
This repository contains a library of all officially supported styles for Vale. The benefits of using these styles over their original implementations include:
44

pkg/Joblint/testdata/test.ct

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$ cdf ${ROOTDIR}/Basic
1+
$ cdf ${ROOTDIR}/basic
22
$ vale --output=line --sort --normalize --relative --no-exit fail.md pass.md real.md
33
fail.md:3:21:Joblint.Profanity:Remove 'fucking'
44
fail.md:3:37:Joblint.TechTerms:Use 'JavaScript' instead of 'java script'

pkg/alex/testdata/test.ct

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
$ cdf ${ROOTDIR}/Basic
1+
$ cdf ${ROOTDIR}/basic
22
$ vale --output=line --sort --normalize --relative --no-exit fail.md pass.md
33
fail.md:3:21:alex.ProfanityLikely:Don't use 'fucking', it's profane.

pkg/proselint/testdata/test.ct

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$ cdf ${ROOTDIR}/Basic
1+
$ cdf ${ROOTDIR}/basic
22
$ vale --output=line --sort --normalize --relative --no-exit test.md
33
test.md:1:19:proselint.Nonwords:Consider using 'regardless' instead of 'irregardless'.
44
test.md:3:18:proselint.Archaisms:'perchance' is archaic.
@@ -35,7 +35,7 @@ test.md:51:27:proselint.Diacritical:Consider using 'Beyoncé' instead of 'Beyonc
3535
test.md:51:36:proselint.P-Value:You should use more decimal places, unless 'p = 0.00' is really true.
3636
test.md:51:47:proselint.Needless:Prefer 'abolition' over 'abolishment'
3737

38-
$ cdf ${ROOTDIR}/Punctuation
38+
$ cdf ${ROOTDIR}/punctuation
3939
$ vale --output=line --sort --normalize --relative --no-exit test.md
4040
test.md:3:17:proselint.Hyperbole:'idea!!' is hyperbolic.
4141
test.md:8:23:proselint.Hyperbole:'here!!' is hyperbolic.

pkg/write-good/testdata/test.ct

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@ test.md:3:1:write-good.E-Prime:Try to avoid using 'Here's'.
88
test.md:6:1:write-good.E-Prime:Try to avoid using 'It's'.
99

1010
$ cdf ${ROOTDIR}/Illusions
11-
$ vale --output=line --sort --normalize --relative test.md test.rst
11+
$ vale --output=line --sort --normalize --relative test.md
1212
test.md:1:1:write-good.Illusions:'the' is repeated!
13-
test.rst:1:1:write-good.Illusions:'foo' is repeated!
1413

1514
$ cdf ${ROOTDIR}/Passive
1615
$ vale --output=line --sort --normalize --relative test.md

0 commit comments

Comments
 (0)