Skip to content

Commit

Permalink
Add JSON schema files to GitHub Pages
Browse files Browse the repository at this point in the history
  • Loading branch information
xxyzz committed Dec 6, 2023
1 parent 353dac9 commit ea62b0a
Show file tree
Hide file tree
Showing 9 changed files with 69 additions and 2,024 deletions.
18 changes: 7 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,24 +29,20 @@ jobs:
cache: 'pip'
- run: |
python -m pip install -U pip
python -m pip install --use-pep517 '.[dev]'
python -m pip install --use-pep517 -e '.[dev]'
- run: make test_coverage
env:
PYTHONWARNINGS: default

coverage_report:
if: github.ref_name == 'master'
needs: test
runs-on: ubuntu-latest
steps:
- run: make coverage_report
- run: |
make coverage_report
make github_pages
if: github.ref_name == 'master' && matrix.python-version == '3.12'
- uses: actions/upload-pages-artifact@v2
with:
path: htmlcov
if: github.ref_name == 'master' && matrix.python-version == '3.12'

deploy:
if: github.ref_name == 'master'
needs: coverage_report
needs: test
permissions:
pages: write
id-token: write
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ usertools/data/
bac-wikt-*
pagesbac/
wikt-db*

# GitHub Pages
_site
12 changes: 8 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
# Run "make test" to run tests (with coverage analysis left in ./htmlcov)
# Run "make test" to run tests
# Run "make clean" to remove automatically generated files
test:
python -m unittest discover -s tests
python -m unittest discover -b -s tests
test_coverage:
python -m coverage erase
python -m coverage run -m unittest discover -s tests
python -m coverage run -m unittest discover -b -s tests
coverage_report:
python -m coverage combine
python -m coverage html
github_pages:
python json_schema/generate_schema.py
cp json_schema/*.json _site
python tools/github_pages.py
clean:
python -m coverage erase
rm -rf __pycache__ htmlcov*
rm -rf __pycache__ _site
Loading

0 comments on commit ea62b0a

Please sign in to comment.