From dc111a43598ba6083040a440e381935990632bdb Mon Sep 17 00:00:00 2001 From: Jonah Aragon Date: Sat, 1 May 2021 19:54:23 -0500 Subject: [PATCH] Add HTML Validation --- .github/workflows/tests.yml | 157 +++++++++++++++++++++++++++++++++++- 1 file changed, 156 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0e296a01..90b885c6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -37,9 +37,10 @@ jobs: uses: ./.github/actions/build link: - name: "Broken Hyperlink Check" + name: "Broken Hyperlinks (Internal)" runs-on: ubuntu-latest needs: [deps, build] + continue-on-error: true steps: - uses: actions/checkout@v2 @@ -63,3 +64,157 @@ jobs: uses: untitaker/hyperlink@0.1.15 with: args: _site/ --sources src/ + + extlink: + name: "Broken Hyperlinks (External)" + runs-on: ubuntu-latest + needs: [build, link] + continue-on-error: true + + steps: + - uses: actions/checkout@v2 + - uses: ruby/setup-ruby@v1 + with: + bundler-cache: true + - uses: actions/setup-node@v2 + with: + node-version: '14' + - name: Build website + uses: ./.github/actions/build + - name: Check HTML + uses: chabad360/htmlproofer@v1.1 + with: + directory: ${{ github.workspace }}/_site + arguments: --assume-extension --external_only --internal-domains privacyguides.org,www.privacyguides.org + + https: + name: "Require HTTPS Internal Links/Images" + runs-on: ubuntu-latest + needs: build + continue-on-error: true + + steps: + - uses: actions/checkout@v2 + - uses: ruby/setup-ruby@v1 + with: + bundler-cache: true + - uses: actions/setup-node@v2 + with: + node-version: '14' + - name: Build website + uses: ./.github/actions/build + - name: Check HTML + uses: chabad360/htmlproofer@v1.1 + with: + directory: ${{ github.workspace }}/_site + arguments: --assume-extension --enforce-https --check-img-http --internal-domains privacyguides.org,www.privacyguides.org --disable-external + + scripts: + name: "Script Reference Checks" + runs-on: ubuntu-latest + needs: [link, https] + continue-on-error: true + + steps: + - uses: actions/checkout@v2 + - uses: ruby/setup-ruby@v1 + with: + bundler-cache: true + - uses: actions/setup-node@v2 + with: + node-version: '14' + - name: Build website + uses: ./.github/actions/build + - name: Check HTML + uses: chabad360/htmlproofer@v1.1 + with: + directory: ${{ github.workspace }}/_site + arguments: --assume-extension --check-html --disable-external --check-sri --report-script-embeds --internal-domains privacyguides.org,www.privacyguides.org + + tags: + name: "HTML Tag Test" + runs-on: ubuntu-latest + needs: https + continue-on-error: true + + steps: + - uses: actions/checkout@v2 + - uses: ruby/setup-ruby@v1 + with: + bundler-cache: true + - uses: actions/setup-node@v2 + with: + node-version: '14' + - name: Build website + uses: ./.github/actions/build + - name: Check HTML + uses: chabad360/htmlproofer@v1.1 + with: + directory: ${{ github.workspace }}/_site + arguments: --assume-extension --check-html --disable-external --internal-domains privacyguides.org,www.privacyguides.org --report-invalid-tags --report-eof-tags --report-mismatched-tags + + entity: + name: "HTML Entity Names Test" + runs-on: ubuntu-latest + needs: https + continue-on-error: true + + steps: + - uses: actions/checkout@v2 + - uses: ruby/setup-ruby@v1 + with: + bundler-cache: true + - uses: actions/setup-node@v2 + with: + node-version: '14' + - name: Build website + uses: ./.github/actions/build + - name: Check HTML + uses: chabad360/htmlproofer@v1.1 + with: + directory: ${{ github.workspace }}/_site + arguments: --assume-extension --check-html --disable-external --internal-domains privacyguides.org,www.privacyguides.org --report-missing-names + + misc: + name: "Misc HTML Test" + runs-on: ubuntu-latest + needs: https + continue-on-error: true + + steps: + - uses: actions/checkout@v2 + - uses: ruby/setup-ruby@v1 + with: + bundler-cache: true + - uses: actions/setup-node@v2 + with: + node-version: '14' + - name: Build website + uses: ./.github/actions/build + - name: Check HTML + uses: chabad360/htmlproofer@v1.1 + with: + directory: ${{ github.workspace }}/_site + arguments: --assume-extension --check-html --disable-external --internal-domains privacyguides.org,www.privacyguides.org --report-missing-doctype + + opengraph: + name: "OpenGraph Test" + runs-on: ubuntu-latest + needs: build + continue-on-error: true + + steps: + - uses: actions/checkout@v2 + - uses: ruby/setup-ruby@v1 + with: + bundler-cache: true + - uses: actions/setup-node@v2 + with: + node-version: '14' + - name: Build website + uses: ./.github/actions/build + - name: Check HTML + uses: chabad360/htmlproofer@v1.1 + with: + directory: ${{ github.workspace }}/_site + arguments: --assume-extension --disable-external --check-opengraph