Skip to content

Commit 9647ecd

Browse files
committed
README.md: mention 'htmltest-action' for GitHub workflows
1 parent c9077f5 commit 9647ecd

File tree

10 files changed

+70
-45
lines changed

10 files changed

+70
-45
lines changed

.github/workflows/ci.yml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ jobs:
99
pre-commit:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v2
13-
- uses: actions/setup-python@v2
14-
- uses: pre-commit/action@v2.0.3
12+
- uses: actions/checkout@v3
13+
- uses: actions/setup-python@v4
14+
- uses: pre-commit/action@v3.0.0
1515

1616
git-describe:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- name: Checkout repo
20-
uses: actions/checkout@v2
20+
uses: actions/checkout@v3
2121
with:
2222
fetch-depth: 0
2323
- name: Fetch tags
@@ -32,9 +32,9 @@ jobs:
3232
os: [ ubuntu-latest, macos-latest ]
3333
steps:
3434
- name: Checkout repo
35-
uses: actions/checkout@v2
35+
uses: actions/checkout@v3
3636
- name: Setup Go
37-
uses: actions/setup-go@v2
37+
uses: actions/setup-go@v3
3838
with:
3939
go-version: ${{ env.GO_VERSION }}
4040
- name: Run unit tests
@@ -49,21 +49,21 @@ jobs:
4949
os: [ ubuntu-latest, macos-latest ]
5050
steps:
5151
- name: Checkout repo
52-
uses: actions/checkout@v2
52+
uses: actions/checkout@v3
5353
with:
5454
fetch-depth: 0
5555
- name: Fetch tags
5656
run: git fetch --force --tags
5757
- name: Setup Go
58-
uses: actions/setup-go@v2
58+
uses: actions/setup-go@v3
5959
with:
6060
go-version: ${{ env.GO_VERSION }}
6161
- name: Set binary name
6262
run: echo "BINARY_NAME=htmltest-${{ matrix.os }}-$(echo $GITHUB_REF | cut -d'/' -f 3)-$(echo $GITHUB_SHA | cut -c1-8)" >> $GITHUB_ENV
6363
- name: Build
6464
run: go build -ldflags "-X main.date=`date -u +%Y-%m-%dT%H:%M:%SZ` -X main.version=`git describe --tags`" -o bin/$BINARY_NAME -x main.go
6565
- name: Upload binary
66-
uses: actions/upload-artifact@v2
66+
uses: actions/upload-artifact@v3
6767
with:
6868
name: ${{ env.BINARY_NAME }}
6969
path: bin/${{ env.BINARY_NAME }}
@@ -81,9 +81,9 @@ jobs:
8181
runs-on: ubuntu-latest
8282
steps:
8383
- name: Checkout repo
84-
uses: actions/checkout@v2
84+
uses: actions/checkout@v3
8585
- name: Setup Go
86-
uses: actions/setup-go@v2
86+
uses: actions/setup-go@v3
8787
with:
8888
go-version: ${{ env.GO_VERSION }}
8989
- name: gofmt
@@ -95,17 +95,17 @@ jobs:
9595
needs: [ test, build ]
9696
steps:
9797
- name: Checkout repo
98-
uses: actions/checkout@v2
98+
uses: actions/checkout@v3
9999
with:
100100
fetch-depth: 0
101101
- name: Fetch tags
102102
run: git fetch --force --tags
103103
- name: Setup Go
104-
uses: actions/setup-go@v2
104+
uses: actions/setup-go@v3
105105
with:
106106
go-version: ${{ env.GO_VERSION }}
107107
- name: Run GoReleaser
108-
uses: goreleaser/goreleaser-action@v2
108+
uses: goreleaser/goreleaser-action@v4
109109
with:
110110
version: latest
111111
args: release --rm-dist
@@ -120,19 +120,19 @@ jobs:
120120
DOCKER_REPO: wjdp/htmltest
121121
steps:
122122
- name: Checkout repo
123-
uses: actions/checkout@v2
123+
uses: actions/checkout@v3
124124
with:
125125
fetch-depth: 0
126126
- name: Fetch tags
127127
run: git fetch --force --tags
128128
- name: Set GIT_VERSION
129129
run: echo "GIT_VERSION=$(git describe --tags)" >> $GITHUB_ENV
130130
- name: Set up QEMU
131-
uses: docker/setup-qemu-action@v1
131+
uses: docker/setup-qemu-action@v2
132132
- name: Set up Docker Buildx
133-
uses: docker/setup-buildx-action@v1
133+
uses: docker/setup-buildx-action@v2
134134
- name: Login to DockerHub
135-
uses: docker/login-action@v1
135+
uses: docker/login-action@v2
136136
with:
137137
username: ${{ secrets.DOCKERHUB_USERNAME }}
138138
password: ${{ secrets.DOCKERHUB_TOKEN }}

README.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ This [godownloader](https://github.com/goreleaser/godownloader) script will quer
2323
curl https://htmltest.wjdp.uk | sudo bash -s -- -b /usr/local/bin
2424
```
2525

26-
You'll be prompted for your password. After simply do `htmltest` to run.
26+
You'll be prompted for your password. Afterwards simply type `htmltest` to run.
2727

2828
#### Into Current Directory
2929

@@ -55,6 +55,28 @@ Mount your directory with html files into the container and test them.
5555
If you need more arguments to the test run it like this:
5656
```docker run -v $(pwd):/test --rm wjdp/htmltest -l 3 -s```
5757

58+
### :octocat: GitHub Action
59+
60+
You can make use of [`htmltest-action`](https://github.com/wjdp/htmltest-action) to run `htmltest` as part of your GitHub Actions workflow.
61+
62+
1. Either by providing a path:
63+
64+
```yaml
65+
- name: Run htmltest
66+
uses: wjdp/htmltest-action@master
67+
with:
68+
path: dist
69+
```
70+
71+
2. Or by pointing a configuration file:
72+
73+
```yaml
74+
- name: Run htmltest
75+
uses: wjdp/htmltest-action@master
76+
with:
77+
config: .htmltest.yml
78+
```
79+
5880
### 🧾 Temporary Files
5981
6082
We store temporary files in `tmp/.htmltest` by default. This contains a log of output and a cache of external links, speeding up subsequent runs. You probably want to ignore it in version control, and perhaps cache it in your CI system.

go.mod

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
module github.com/wjdp/htmltest
22

33
require (
4-
github.com/badoux/checkmail v1.2.1
4+
github.com/badoux/checkmail v1.2.2-0.20210531140817-a155f10fefd5
55
github.com/daviddengcn/go-algs v0.0.0-20180330170136-fe23fabd9d06 // indirect
66
github.com/daviddengcn/go-assert v0.0.0-20150305222929-ba7e68aeeff6
77
github.com/daviddengcn/go-villa v0.0.0-20200811194146-68107afb6d76 // indirect
88
github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815
9-
github.com/fatih/color v1.10.0
9+
github.com/fatih/color v1.14.1
1010
github.com/golangplus/bytes v1.0.0 // indirect
1111
github.com/golangplus/sort v1.0.0 // indirect
12-
github.com/imdario/mergo v0.3.11
12+
github.com/imdario/mergo v0.3.9
1313
github.com/seborama/govcr v4.5.0+incompatible // indirect
1414
golang.org/x/net v0.0.0-20201224014010-6772e930b67b
15-
golang.org/x/sys v0.0.0-20210113181707-4bcb84eeeb78 // indirect
15+
golang.org/x/sys v0.5.0 // indirect
1616
gopkg.in/seborama/govcr.v4 v4.5.0
17-
gopkg.in/yaml.v2 v2.4.0
17+
gopkg.in/yaml.v2 v2.4.0 // indirect
18+
gopkg.in/yaml.v3 v3.0.1
1819
)
1920

2021
go 1.13

go.sum

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
github.com/badoux/checkmail v1.2.1 h1:TzwYx5pnsV6anJweMx2auXdekBwGr/yt1GgalIx9nBQ=
2-
github.com/badoux/checkmail v1.2.1/go.mod h1:XroCOBU5zzZJcLvgwU15I+2xXyCdTWXyR9MGfRhBYy0=
1+
github.com/badoux/checkmail v1.2.2-0.20210531140817-a155f10fefd5 h1:gSsYVF9m7yI1GiwXdDCOAAqkkFeSE49CZeUNlZCPE2A=
2+
github.com/badoux/checkmail v1.2.2-0.20210531140817-a155f10fefd5/go.mod h1:XroCOBU5zzZJcLvgwU15I+2xXyCdTWXyR9MGfRhBYy0=
33
github.com/daviddengcn/go-algs v0.0.0-20180330170136-fe23fabd9d06 h1:jEHTltplMBbYsHlSnvZD1J4CsfweUSJIqS8uP56q1Ng=
44
github.com/daviddengcn/go-algs v0.0.0-20180330170136-fe23fabd9d06/go.mod h1:CpyLopUWBmqupyWU6OlSfrzgIuzNq0R6DXzM74O9RMs=
55
github.com/daviddengcn/go-assert v0.0.0-20150305222929-ba7e68aeeff6 h1:OPIYL/VhQiSpoaxIcmeYdghLswBylfk6JDVCUqadXxg=
@@ -8,8 +8,8 @@ github.com/daviddengcn/go-villa v0.0.0-20200811194146-68107afb6d76 h1:7m/Wr7m1KG
88
github.com/daviddengcn/go-villa v0.0.0-20200811194146-68107afb6d76/go.mod h1:U8xNoHcXfPnZzy9zCxeKRjaJgC1d3613rFHjZVVAqKc=
99
github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815 h1:bWDMxwH3px2JBh6AyO7hdCn/PkvCZXii8TGj7sbtEbQ=
1010
github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE=
11-
github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg=
12-
github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM=
11+
github.com/fatih/color v1.14.1 h1:qfhVLaG5s+nCROl1zJsZRxFeYrHLqWroPOQ8BWiNb4w=
12+
github.com/fatih/color v1.14.1/go.mod h1:2oHN61fhTpgcxD3TSWCgKDiH1+x4OiDVVGH8WlgGZGg=
1313
github.com/golangplus/bytes v0.0.0-20160111154220-45c989fe5450/go.mod h1:Bk6SMAONeMXrxql8uvOKuAZSu8aM5RUGv+1C6IJaEho=
1414
github.com/golangplus/bytes v1.0.0 h1:YQKBijBVMsBxIiXT4IEhlKR2zHohjEqPole4umyDX+c=
1515
github.com/golangplus/bytes v1.0.0/go.mod h1:AdRaCFwmc/00ZzELMWb01soso6W1R/++O1XL80yAn+A=
@@ -19,28 +19,30 @@ github.com/golangplus/sort v1.0.0 h1:nvzfdNN8GNWv7iZ6PENJBmXE+r7OGv4tqbdjjNAZKXE
1919
github.com/golangplus/sort v1.0.0/go.mod h1:ixQX/WLtGd0UQxcO9cWrtAv0daVnQpo4KfqBUIassNM=
2020
github.com/golangplus/testing v1.0.0 h1:+ZeeiKZENNOMkTTELoSySazi+XaEhVO0mb+eanrSEUQ=
2121
github.com/golangplus/testing v1.0.0/go.mod h1:ZDreixUV3YzhoVraIDyOzHrr76p6NUh6k/pPg/Q3gYA=
22-
github.com/imdario/mergo v0.3.11 h1:3tnifQM4i+fbajXKBHXWEH+KvNHqojZ778UH75j3bGA=
23-
github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
24-
github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8=
25-
github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
26-
github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY=
27-
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
22+
github.com/imdario/mergo v0.3.9 h1:UauaLniWCFHWd+Jp9oCEkTBj8VO/9DKg3PV3VCNMDIg=
23+
github.com/imdario/mergo v0.3.9/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
24+
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
25+
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
26+
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
27+
github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng=
28+
github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
2829
github.com/seborama/govcr v4.5.0+incompatible h1:XvdHtXi0d4cUAn+0aWolvwfS3nmhNC8Z+yMQwn/M64I=
2930
github.com/seborama/govcr v4.5.0+incompatible/go.mod h1:EgcISudCCYDLzbiAImJ8i7kk4+wTA44Kp+j4S0LhASI=
3031
golang.org/x/net v0.0.0-20201224014010-6772e930b67b h1:iFwSg7t5GZmB/Q5TjiEAsdoLDrdJRC1RiF2WhuV29Qw=
3132
golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
32-
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
33-
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
3433
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
35-
golang.org/x/sys v0.0.0-20210113181707-4bcb84eeeb78 h1:nVuTkr9L6Bq62qpUqKo/RnZCFfzDBL0bYo6w9OJUqZY=
36-
golang.org/x/sys v0.0.0-20210113181707-4bcb84eeeb78/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
34+
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
35+
golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
36+
golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU=
37+
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
3738
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
3839
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
3940
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
4041
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
4142
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
4243
gopkg.in/seborama/govcr.v4 v4.5.0 h1:hQ8Kt7CFNQetfPZhu9uldJsfhGPMTCIxaNylKPVr3JA=
4344
gopkg.in/seborama/govcr.v4 v4.5.0/go.mod h1:GSulKzJ4LIk6XH6sE+OKL76FwDIVQEja2Oh2hTSddIk=
44-
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
4545
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
4646
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
47+
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
48+
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

htmltest/check-link_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ func TestAnchorExternalHrefIPTimeout(t *testing.T) {
173173
}
174174

175175
func TestAnchorExternalBrokenOptionHrefIPTimeout(t *testing.T) {
176-
// passes for broken IP address links when aksed
176+
// passes for broken IP address links when asked
177177
hT := tTestFileOpts("fixtures/links/ip_timeout.html",
178178
map[string]interface{}{"IgnoreExternalBrokenLinks": true, "ExternalTimeout": 1})
179179
tExpectIssueCount(t, hT, 0)

htmltest/fixtures/generic/citeBlank.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<p><ins cite="">This text has been inserted</ins></p>
88

9-
<p>Everytime Kenny is killed, Stan will announce
9+
<p>Every time Kenny is killed, Stan will announce
1010
<q cite="">
1111
Oh my God, you/they murdered Kenny!
1212
</q>.

htmltest/fixtures/generic/citeBroken.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<p><ins cite="nope.html">This text has been inserted</ins></p>
88

9-
<p>Everytime Kenny is killed, Stan will announce
9+
<p>Every time Kenny is killed, Stan will announce
1010
<q cite="https://en.wikipedia.org/wiki/Kenny_McCormick_Nope">
1111
Oh my God, you/they murdered Kenny!
1212
</q>.

htmltest/fixtures/generic/citeMissing.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<p><ins>This text has been inserted</ins></p>
88

9-
<p>Everytime Kenny is killed, Stan will announce
9+
<p>Every time Kenny is killed, Stan will announce
1010
<q>
1111
Oh my God, you/they murdered Kenny!
1212
</q>.

htmltest/fixtures/generic/citeValid.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<p><ins cite="page.html">This text has been inserted</ins></p>
88

9-
<p>Everytime Kenny is killed, Stan will announce
9+
<p>Every time Kenny is killed, Stan will announce
1010
<q cite="http://en.wikipedia.org/wiki/Kenny_McCormick#Cultural_impact">
1111
Oh my God, you/they killed Kenny!
1212
</q>.

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"github.com/fatih/color"
88
"github.com/wjdp/htmltest/htmltest"
99
"github.com/wjdp/htmltest/output"
10-
"gopkg.in/yaml.v2"
10+
"gopkg.in/yaml.v3"
1111
"io/ioutil"
1212
"os"
1313
"path"

0 commit comments

Comments
 (0)