Update README.md #213
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Run Python unit tests | |
run: python3 -u -m unittest tests/tests.py | |
- name: Verify that the Docker image for the action builds | |
run: docker build . --file Dockerfile | |
- name: Create new uncommitted html file for testing | |
run: touch tests/uncommitted.html | |
- name: Integration test 1 | |
id: integration | |
uses: ./ | |
with: | |
path-to-root: tests | |
base-url-path: https://TESTING.FAKE.WEB.ADDRESS.TESTING/ | |
- name: Output stats test 1 | |
run: | | |
echo "sitemap-path = ${{ steps.integration.outputs.sitemap-path }}" | |
echo "url-count = ${{ steps.integration.outputs.url-count }}" | |
echo "excluded-count = ${{ steps.integration.outputs.excluded-count }}" | |
- name: Integration test 2 | |
id: integration2 | |
uses: ./ | |
with: | |
path-to-root: tests | |
base-url-path: https://TESTING.FAKE.WEB.ADDRESS.TESTING/ | |
sitemap-format: txt | |
additional-extensions: docx pptx | |
- name: Output stats test 2 | |
run: | | |
echo "sitemap-path = ${{ steps.integration2.outputs.sitemap-path }}" | |
echo "url-count = ${{ steps.integration2.outputs.url-count }}" | |
echo "excluded-count = ${{ steps.integration2.outputs.excluded-count }}" | |
- name: Integration test 3 | |
id: integration3 | |
uses: ./ | |
with: | |
path-to-root: tests/subdir | |
base-url-path: https://TESTING.FAKE.WEB.ADDRESS.TESTING/ | |
drop-html-extension: true | |
- name: Output stats test 3 | |
run: | | |
echo "sitemap-path = ${{ steps.integration3.outputs.sitemap-path }}" | |
echo "url-count = ${{ steps.integration3.outputs.url-count }}" | |
echo "excluded-count = ${{ steps.integration3.outputs.excluded-count }}" | |
- name: Integration test 4 | |
id: integration4 | |
uses: ./ | |
with: | |
path-to-root: tests/subdir | |
base-url-path: https://TESTING.FAKE.WEB.ADDRESS.TESTING/ | |
sitemap-format: txt | |
additional-extensions: docx pptx | |
drop-html-extension: true | |
- name: Output stats test 4 | |
run: | | |
echo "sitemap-path = ${{ steps.integration4.outputs.sitemap-path }}" | |
echo "url-count = ${{ steps.integration4.outputs.url-count }}" | |
echo "excluded-count = ${{ steps.integration4.outputs.excluded-count }}" | |
- name: Verify integration test results | |
run: python3 -u -m unittest tests/integration.py | |