-
-
Notifications
You must be signed in to change notification settings - Fork 15
97 lines (77 loc) · 2.7 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
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.12'
- 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