Skip to content

Commit 04cd413

Browse files
authored
Merge pull request #686 from doorstop-dev/release/3.0
Release v3.0
2 parents 07ef4d2 + c031184 commit 04cd413

File tree

182 files changed

+37562
-3046
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

182 files changed

+37562
-3046
lines changed

.appveyor.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

.coveragerc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ omit =
77
*/tests/*
88
*/__main__.py
99

10+
dynamic_context = test_function
11+
1012
[report]
1113

1214
omit =
@@ -19,6 +21,8 @@ exclude_lines =
1921
pragma: no cover
2022
raise NotImplementedError
2123
except DistributionNotFound
22-
if __name__ == '__main__'
2324

24-
skip_covered = true
25+
skip_covered = false
26+
27+
[html]
28+
show_contexts = True

.gitattributes

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
CHANGELOG.md merge=union
33

44
*.xlsx binary
5+
*.min.js binary
6+
*.min.css binary
7+
doorstop/core/files/templates/html/output/*.js binary
8+
doorstop/core/files/templates/html/tex-mml-chtml.js binary
9+
doorstop/core/tests/files/published*.html binary
510

611
# Python, Git, and Cygwin have different ideas about the correct line endings
712
*.yml -text
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Execute tests
2+
on:
3+
workflow_call:
4+
inputs:
5+
basepath:
6+
required: false
7+
type: string
8+
os:
9+
required: true
10+
type: string
11+
workpath:
12+
required: true
13+
type: string
14+
15+
jobs:
16+
change-coverage:
17+
runs-on: ubuntu-latest
18+
name: Change coverage
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0
24+
25+
- uses: actions/setup-python@v5
26+
with:
27+
python-version: "3.11"
28+
architecture: x64
29+
30+
- uses: Gr1N/setup-poetry@v8
31+
32+
- name: Check system dependencies
33+
run: make doctor
34+
35+
- uses: actions/cache@v4
36+
with:
37+
path: .venv
38+
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
39+
40+
- name: Install project dependencies
41+
run: make install
42+
43+
- name: Check coverage
44+
run: |
45+
TEST_INTEGRATION=true poetry run pytest doorstop --doctest-modules --cov=doorstop --cov-report=xml --cov-report=term-missing
46+
git fetch origin develop:develop
47+
# TEST_INTEGRATION=true poetry run diff-cover ./coverage.xml --fail-under=100 --compare-branch=develop
48+
TEST_INTEGRATION=true poetry run diff-cover ./coverage.xml --fail-under=100 --compare-branch=$(git for-each-ref --sort=-committerdate refs/heads/develop | cut -f 1 -d ' ')

.github/workflows/execute-tests.yml

100755100644
Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,17 @@ on:
1111
workpath:
1212
required: true
1313
type: string
14+
secrets:
15+
CODECOV_TOKEN:
16+
required: true
1417

1518
jobs:
1619
test:
1720
runs-on: ${{ inputs.os }}
1821
strategy:
19-
fail-fast: false
22+
fail-fast: true
2023
matrix:
21-
python-version: ["3.8", "3.9", "3.10"]
24+
python-version: ["3.9", "3.10", "3.11", "3.12"]
2225
name: Python ${{ matrix.python-version }}
2326

2427
defaults:
@@ -27,7 +30,7 @@ jobs:
2730

2831
steps:
2932
- name: Checkout
30-
uses: actions/checkout@v2
33+
uses: actions/checkout@v4
3134

3235
- name: Change path on Windows
3336
if: ${{ inputs.os == 'windows-latest' }}
@@ -38,7 +41,7 @@ jobs:
3841
mkdir -p ${{ inputs.workpath }}
3942
mv $env:GITHUB_WORKSPACE\* ${{ inputs.workpath }}\ -Force
4043
41-
- uses: actions/setup-python@v2
44+
- uses: actions/setup-python@v5
4245
with:
4346
python-version: ${{ matrix.python-version }}
4447
architecture: x64
@@ -48,31 +51,22 @@ jobs:
4851
- name: Check system dependencies
4952
run: make doctor
5053

51-
- uses: actions/cache@v2
54+
- uses: actions/cache@v4
5255
with:
5356
path: .venv
5457
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
5558

5659
- name: Install project dependencies
5760
run: make install
5861

59-
# Some tests fails intermittently, likely due to the public runners being
60-
# very slow. Especially any client/server tests seems to be problematic.
61-
# This is a simple attempt to re-run the tests up to three times if they
62-
# fail. Does not add any execution time if successful.
63-
- name: Run tests attempt 1
64-
run: make test
65-
- name: Run tests attempt 2
66-
if: ${{ failure() }}
67-
run: make test
68-
- name: Run tests attempt 3
69-
if: ${{ failure() }}
62+
- name: Run tests
7063
run: make test
7164

7265
- name: Upload coverage
73-
uses: codecov/codecov-action@v1
66+
uses: codecov/codecov-action@v4
7467
if: ${{ inputs.os == 'ubuntu-latest' && matrix.python-version == '3.9' && github.repository == 'doorstop-dev/doorstop' }}
7568
with:
69+
token: ${{ secrets.CODECOV_TOKEN }}
7670
fail_ci_if_error: true
7771

7872
- name: Run checks

.github/workflows/test-linux.yml

100755100644
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,17 @@ on:
66
branches: [ develop ]
77

88
jobs:
9+
Coverage:
10+
uses: ./.github/workflows/change-coverage.yml
11+
with:
12+
os: "ubuntu-latest"
13+
workpath: "/home/runner/work/doorstop/doorstop"
14+
if: github.event_name == 'pull_request'
15+
916
Test:
1017
uses: ./.github/workflows/execute-tests.yml
1118
with:
1219
os: "ubuntu-latest"
1320
workpath: "/home/runner/work/doorstop/doorstop"
21+
secrets:
22+
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}

.github/workflows/test-osx.yml

100755100644
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,7 @@ jobs:
99
Test:
1010
uses: ./.github/workflows/execute-tests.yml
1111
with:
12-
os: "macos-latest"
12+
os: "macos-13"
1313
workpath: "/Users/runner/work/doorstop/doorstop"
14+
secrets:
15+
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}

.github/workflows/test-windows.yml

100755100644
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ jobs:
1212
basepath: 'D:\'
1313
os: "windows-latest"
1414
workpath: 'C:\a\doorstop\doorstop'
15+
secrets:
16+
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Icon*
1111
# Temporary virtual environment files
1212
/.cache/
1313
/.venv/
14+
/.python-version
1415

1516
# Temporary server files
1617
.env
@@ -22,6 +23,7 @@ Icon*
2223
/site/
2324
/*.html
2425
/docs/*.png
26+
texput.log
2527

2628
# Google Drive
2729
*.gdoc
@@ -37,6 +39,7 @@ Icon*
3739
/pyunit.xml
3840
/tmp/
3941
*.tmp
42+
coverage.xml
4043

4144
# Build and release directories
4245
/build/

.pre-commit-hooks.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# expected stages: commit, commit-msg, manual, merge-commit, post-checkout, post-commit, post-merge, post-rewrite, prepare-commit-msg, push
2+
3+
- id: check-doorstop-errors
4+
args: ["-W"]
5+
name: check for doorstop errors
6+
description: ensures the changes introduces no errors
7+
entry: doorstop
8+
language: python
9+
verbose: true
10+
pass_filenames: false
11+
stages: [commit, push, manual]
12+
13+
- id: check-unreviewed-items
14+
name: ensure that all requirements are reviewed before being committed
15+
description: ensure that all documents/requirements are reviewed before being committed
16+
entry: git_hooks/check_unreviewed_requirements.sh
17+
language: script
18+
verbose: true
19+
pass_filenames: false
20+
stages: [merge-commit, manual]

0 commit comments

Comments
 (0)