Skip to content

Commit 07ef4d2

Browse files
authored
Merge pull request #605 from doorstop-dev/pyyaml-6
Upgrade PyYAML to fix installation on newer Python versions
2 parents ca11cdd + 6875573 commit 07ef4d2

File tree

9 files changed

+713
-651
lines changed

9 files changed

+713
-651
lines changed
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
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+
test:
17+
runs-on: ${{ inputs.os }}
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
python-version: ["3.8", "3.9", "3.10"]
22+
name: Python ${{ matrix.python-version }}
23+
24+
defaults:
25+
run:
26+
working-directory: ${{ inputs.workpath }}
27+
28+
steps:
29+
- name: Checkout
30+
uses: actions/checkout@v2
31+
32+
- name: Change path on Windows
33+
if: ${{ inputs.os == 'windows-latest' }}
34+
# Cannot start powershell from a path that does not exist, so change
35+
# working directory for this step only.
36+
working-directory: ${{ inputs.basepath }}
37+
run: |
38+
mkdir -p ${{ inputs.workpath }}
39+
mv $env:GITHUB_WORKSPACE\* ${{ inputs.workpath }}\ -Force
40+
41+
- uses: actions/setup-python@v2
42+
with:
43+
python-version: ${{ matrix.python-version }}
44+
architecture: x64
45+
46+
- uses: Gr1N/setup-poetry@v8
47+
48+
- name: Check system dependencies
49+
run: make doctor
50+
51+
- uses: actions/cache@v2
52+
with:
53+
path: .venv
54+
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
55+
56+
- name: Install project dependencies
57+
run: make install
58+
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() }}
70+
run: make test
71+
72+
- name: Upload coverage
73+
uses: codecov/codecov-action@v1
74+
if: ${{ inputs.os == 'ubuntu-latest' && matrix.python-version == '3.9' && github.repository == 'doorstop-dev/doorstop' }}
75+
with:
76+
fail_ci_if_error: true
77+
78+
- name: Run checks
79+
run: make check
80+
if: ${{ inputs.os == 'ubuntu-latest' }}
81+
82+
- name: Run demo
83+
run: make demo
84+
if: ${{ inputs.os == 'ubuntu-latest' }}

.github/workflows/test-linux.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Linux
2+
3+
on:
4+
push:
5+
pull_request:
6+
branches: [ develop ]
7+
8+
jobs:
9+
Test:
10+
uses: ./.github/workflows/execute-tests.yml
11+
with:
12+
os: "ubuntu-latest"
13+
workpath: "/home/runner/work/doorstop/doorstop"

.github/workflows/test-osx.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: macOS
2+
3+
on:
4+
push:
5+
pull_request:
6+
branches: [ develop ]
7+
8+
jobs:
9+
Test:
10+
uses: ./.github/workflows/execute-tests.yml
11+
with:
12+
os: "macos-latest"
13+
workpath: "/Users/runner/work/doorstop/doorstop"

.github/workflows/test-windows.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Windows
2+
3+
on:
4+
push:
5+
pull_request:
6+
branches: [ develop ]
7+
8+
jobs:
9+
Test:
10+
uses: ./.github/workflows/execute-tests.yml
11+
with:
12+
basepath: 'D:\'
13+
os: "windows-latest"
14+
workpath: 'C:\a\doorstop\doorstop'

.tool-versions

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
python 3.8.13
2+
poetry 1.6.1

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 2.2.1 (2023-10-07)
2+
3+
- Upgrade PyYAML to 6.x to fix installation on newer versions of Python.
4+
15
# 2.2 (2022-01-22)
26

37
- Added support for UTF-8 symbols in references. ([@stanislaw](https://github.com/doorstop-dev/doorstop/pull/485))

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ DEPENDENCIES := $(VIRTUAL_ENV)/.poetry-$(shell bin/checksum pyproject.toml poetr
4444
install: $(DEPENDENCIES) .cache
4545

4646
$(DEPENDENCIES): poetry.lock
47+
@ rm -rf ~/Library/Preferences/pypoetry
4748
@ poetry config virtualenvs.in-project true
4849
poetry install
4950
@ touch $@

0 commit comments

Comments
 (0)