-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
760 additions
and
801 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Check for no stipulation | ||
on: | ||
push: | ||
branches: ["main"] | ||
pull_request: | ||
|
||
jobs: | ||
check-no-stipulation: | ||
strategy: | ||
matrix: | ||
document: | ||
- "entrust" | ||
|
||
name: Check ${{ matrix.document }}.md for no stipulation | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Python Environment | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.x" | ||
|
||
- name: Install Python Dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r tools/requirements.txt | ||
- name: Run check | ||
run: | | ||
python tools/check_no_stipulation.py ${{ matrix.document }}.md |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Test tools | ||
on: | ||
push: | ||
branches: ["main"] | ||
paths: | ||
- "tools/**" | ||
pull_request: | ||
paths: | ||
- "tools/**" | ||
|
||
jobs: | ||
test-tools-job: | ||
name: Run Unit Tests for Tools | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Python Environment | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.x" | ||
|
||
- name: Install Python Dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r tools/requirements.txt | ||
- name: Execute Unit Tests | ||
run: | | ||
cd ./tools | ||
python -m unittest *_test.py |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Python | ||
*.pyc | ||
__pycache__/ | ||
*.pyo | ||
*.pyd | ||
*.pyi | ||
*.pyz | ||
*.pyw | ||
*.pyz/ | ||
*.pyw/ | ||
*.egg-info/ | ||
dist/ | ||
build/ |
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
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import unittest | ||
from cabforum_links import replace_references, generate_document_pattern | ||
|
||
document_input = """ | ||
Check SSL Baseline Requirements section 1. | ||
TLS Baseline Requirements Section 1.2 if you like. | ||
TLS BR section 1.2.3. | ||
Code Signing Baseline Requirements section 2. | ||
Code Signing BR section 3.6 | ||
TLS EV Guidelines | ||
TLS EV Guidelines Section 4.5 | ||
""" | ||
|
||
class TestCheckReplaceReferences(unittest.TestCase): | ||
def test_replace_references(self): | ||
document_pattern = generate_document_pattern() | ||
output = replace_references(document_input, document_pattern) | ||
|
||
expected_result = """ | ||
Check [SSL Baseline Requirements section 1](https://cabforum.org/working-groups/server/baseline-requirements/requirements/#section-1). | ||
[TLS Baseline Requirements Section 1.2](https://cabforum.org/working-groups/server/baseline-requirements/requirements/#section-1.2) if you like. | ||
[TLS BR section 1.2.3](https://cabforum.org/working-groups/server/baseline-requirements/requirements/#section-1.2.3). | ||
[Code Signing Baseline Requirements section 2](https://cabforum.org/working-groups/code-signing/requirements/#section-2). | ||
[Code Signing BR section 3.6](https://cabforum.org/working-groups/code-signing/requirements/#section-3.6) | ||
TLS EV Guidelines | ||
[TLS EV Guidelines Section 4.5](https://cabforum.org/working-groups/server/extended-validation/guidelines/#section-4.5) | ||
""" | ||
self.maxDiff = 1000 | ||
self.assertEqual(output, expected_result) | ||
|
||
|
||
if __name__ == '__main__': | ||
unittest.main() |
Oops, something went wrong.