Skip to content

Commit

Permalink
Merge pull request #686 from doorstop-dev/release/3.0
Browse files Browse the repository at this point in the history
Release v3.0
  • Loading branch information
jacebrowning authored Jan 11, 2025
2 parents 07ef4d2 + c031184 commit 04cd413
Show file tree
Hide file tree
Showing 182 changed files with 37,562 additions and 3,046 deletions.
36 changes: 0 additions & 36 deletions .appveyor.yml

This file was deleted.

8 changes: 6 additions & 2 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ omit =
*/tests/*
*/__main__.py

dynamic_context = test_function

[report]

omit =
Expand All @@ -19,6 +21,8 @@ exclude_lines =
pragma: no cover
raise NotImplementedError
except DistributionNotFound
if __name__ == '__main__'

skip_covered = true
skip_covered = false

[html]
show_contexts = True
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
CHANGELOG.md merge=union

*.xlsx binary
*.min.js binary
*.min.css binary
doorstop/core/files/templates/html/output/*.js binary
doorstop/core/files/templates/html/tex-mml-chtml.js binary
doorstop/core/tests/files/published*.html binary

# Python, Git, and Cygwin have different ideas about the correct line endings
*.yml -text
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/change-coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Execute tests
on:
workflow_call:
inputs:
basepath:
required: false
type: string
os:
required: true
type: string
workpath:
required: true
type: string

jobs:
change-coverage:
runs-on: ubuntu-latest
name: Change coverage
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-python@v5
with:
python-version: "3.11"
architecture: x64

- uses: Gr1N/setup-poetry@v8

- name: Check system dependencies
run: make doctor

- uses: actions/cache@v4
with:
path: .venv
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}

- name: Install project dependencies
run: make install

- name: Check coverage
run: |
TEST_INTEGRATION=true poetry run pytest doorstop --doctest-modules --cov=doorstop --cov-report=xml --cov-report=term-missing
git fetch origin develop:develop
# TEST_INTEGRATION=true poetry run diff-cover ./coverage.xml --fail-under=100 --compare-branch=develop
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 ' ')
28 changes: 11 additions & 17 deletions .github/workflows/execute-tests.yml
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,17 @@ on:
workpath:
required: true
type: string
secrets:
CODECOV_TOKEN:
required: true

jobs:
test:
runs-on: ${{ inputs.os }}
strategy:
fail-fast: false
fail-fast: true
matrix:
python-version: ["3.8", "3.9", "3.10"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
name: Python ${{ matrix.python-version }}

defaults:
Expand All @@ -27,7 +30,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

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

- uses: actions/cache@v2
- uses: actions/cache@v4
with:
path: .venv
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}

- name: Install project dependencies
run: make install

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

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

- name: Run checks
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/test-linux.yml
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,17 @@ on:
branches: [ develop ]

jobs:
Coverage:
uses: ./.github/workflows/change-coverage.yml
with:
os: "ubuntu-latest"
workpath: "/home/runner/work/doorstop/doorstop"
if: github.event_name == 'pull_request'

Test:
uses: ./.github/workflows/execute-tests.yml
with:
os: "ubuntu-latest"
workpath: "/home/runner/work/doorstop/doorstop"
secrets:
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
4 changes: 3 additions & 1 deletion .github/workflows/test-osx.yml
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,7 @@ jobs:
Test:
uses: ./.github/workflows/execute-tests.yml
with:
os: "macos-latest"
os: "macos-13"
workpath: "/Users/runner/work/doorstop/doorstop"
secrets:
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
2 changes: 2 additions & 0 deletions .github/workflows/test-windows.yml
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ jobs:
basepath: 'D:\'
os: "windows-latest"
workpath: 'C:\a\doorstop\doorstop'
secrets:
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Icon*
# Temporary virtual environment files
/.cache/
/.venv/
/.python-version

# Temporary server files
.env
Expand All @@ -22,6 +23,7 @@ Icon*
/site/
/*.html
/docs/*.png
texput.log

# Google Drive
*.gdoc
Expand All @@ -37,6 +39,7 @@ Icon*
/pyunit.xml
/tmp/
*.tmp
coverage.xml

# Build and release directories
/build/
Expand Down
20 changes: 20 additions & 0 deletions .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# expected stages: commit, commit-msg, manual, merge-commit, post-checkout, post-commit, post-merge, post-rewrite, prepare-commit-msg, push

- id: check-doorstop-errors
args: ["-W"]
name: check for doorstop errors
description: ensures the changes introduces no errors
entry: doorstop
language: python
verbose: true
pass_filenames: false
stages: [commit, push, manual]

- id: check-unreviewed-items
name: ensure that all requirements are reviewed before being committed
description: ensure that all documents/requirements are reviewed before being committed
entry: git_hooks/check_unreviewed_requirements.sh
language: script
verbose: true
pass_filenames: false
stages: [merge-commit, manual]
Loading

0 comments on commit 04cd413

Please sign in to comment.