Skip to content

Commit

Permalink
Add workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jdkato committed Sep 20, 2023
1 parent 1a81360 commit 94762b7
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 7 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Build + Test

on: push

jobs:
styles:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: "1.20"

- name: Install Vale
run: |
go install github.com/errata-ai/vale/v2/cmd/vale@latest
echo 'export PATH=$PATH:$(go env GOPATH)/bin' >> $GITHUB_PATH
- name: Run tests
run: |
go test -v ./pkg
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Styles [![Build Status](https://travis-ci.org/errata-ai/styles.svg?branch=master)](https://travis-ci.org/errata-ai/styles)
# Styles

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

Expand Down
2 changes: 1 addition & 1 deletion pkg/Joblint/testdata/test.ct
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$ cdf ${ROOTDIR}/Basic
$ cdf ${ROOTDIR}/basic
$ vale --output=line --sort --normalize --relative --no-exit fail.md pass.md real.md
fail.md:3:21:Joblint.Profanity:Remove 'fucking'
fail.md:3:37:Joblint.TechTerms:Use 'JavaScript' instead of 'java script'
Expand Down
2 changes: 1 addition & 1 deletion pkg/alex/testdata/test.ct
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
$ cdf ${ROOTDIR}/Basic
$ cdf ${ROOTDIR}/basic
$ vale --output=line --sort --normalize --relative --no-exit fail.md pass.md
fail.md:3:21:alex.ProfanityLikely:Don't use 'fucking', it's profane.
4 changes: 2 additions & 2 deletions pkg/proselint/testdata/test.ct
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$ cdf ${ROOTDIR}/Basic
$ cdf ${ROOTDIR}/basic
$ vale --output=line --sort --normalize --relative --no-exit test.md
test.md:1:19:proselint.Nonwords:Consider using 'regardless' instead of 'irregardless'.
test.md:3:18:proselint.Archaisms:'perchance' is archaic.
Expand Down Expand Up @@ -35,7 +35,7 @@ test.md:51:27:proselint.Diacritical:Consider using 'Beyoncé' instead of 'Beyonc
test.md:51:36:proselint.P-Value:You should use more decimal places, unless 'p = 0.00' is really true.
test.md:51:47:proselint.Needless:Prefer 'abolition' over 'abolishment'

$ cdf ${ROOTDIR}/Punctuation
$ cdf ${ROOTDIR}/punctuation
$ vale --output=line --sort --normalize --relative --no-exit test.md
test.md:3:17:proselint.Hyperbole:'idea!!' is hyperbolic.
test.md:8:23:proselint.Hyperbole:'here!!' is hyperbolic.
Expand Down
3 changes: 1 addition & 2 deletions pkg/write-good/testdata/test.ct
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ test.md:3:1:write-good.E-Prime:Try to avoid using 'Here's'.
test.md:6:1:write-good.E-Prime:Try to avoid using 'It's'.

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

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

0 comments on commit 94762b7

Please sign in to comment.