-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #605 from doorstop-dev/pyyaml-6
Upgrade PyYAML to fix installation on newer Python versions
- Loading branch information
Showing
9 changed files
with
713 additions
and
651 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
name: Execute tests | ||
on: | ||
workflow_call: | ||
inputs: | ||
basepath: | ||
required: false | ||
type: string | ||
os: | ||
required: true | ||
type: string | ||
workpath: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
test: | ||
runs-on: ${{ inputs.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.8", "3.9", "3.10"] | ||
name: Python ${{ matrix.python-version }} | ||
|
||
defaults: | ||
run: | ||
working-directory: ${{ inputs.workpath }} | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Change path on Windows | ||
if: ${{ inputs.os == 'windows-latest' }} | ||
# Cannot start powershell from a path that does not exist, so change | ||
# working directory for this step only. | ||
working-directory: ${{ inputs.basepath }} | ||
run: | | ||
mkdir -p ${{ inputs.workpath }} | ||
mv $env:GITHUB_WORKSPACE\* ${{ inputs.workpath }}\ -Force | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
architecture: x64 | ||
|
||
- uses: Gr1N/setup-poetry@v8 | ||
|
||
- name: Check system dependencies | ||
run: make doctor | ||
|
||
- uses: actions/cache@v2 | ||
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() }} | ||
run: make test | ||
|
||
- name: Upload coverage | ||
uses: codecov/codecov-action@v1 | ||
if: ${{ inputs.os == 'ubuntu-latest' && matrix.python-version == '3.9' && github.repository == 'doorstop-dev/doorstop' }} | ||
with: | ||
fail_ci_if_error: true | ||
|
||
- name: Run checks | ||
run: make check | ||
if: ${{ inputs.os == 'ubuntu-latest' }} | ||
|
||
- name: Run demo | ||
run: make demo | ||
if: ${{ inputs.os == 'ubuntu-latest' }} |
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 @@ | ||
name: Linux | ||
|
||
on: | ||
push: | ||
pull_request: | ||
branches: [ develop ] | ||
|
||
jobs: | ||
Test: | ||
uses: ./.github/workflows/execute-tests.yml | ||
with: | ||
os: "ubuntu-latest" | ||
workpath: "/home/runner/work/doorstop/doorstop" |
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 @@ | ||
name: macOS | ||
|
||
on: | ||
push: | ||
pull_request: | ||
branches: [ develop ] | ||
|
||
jobs: | ||
Test: | ||
uses: ./.github/workflows/execute-tests.yml | ||
with: | ||
os: "macos-latest" | ||
workpath: "/Users/runner/work/doorstop/doorstop" |
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,14 @@ | ||
name: Windows | ||
|
||
on: | ||
push: | ||
pull_request: | ||
branches: [ develop ] | ||
|
||
jobs: | ||
Test: | ||
uses: ./.github/workflows/execute-tests.yml | ||
with: | ||
basepath: 'D:\' | ||
os: "windows-latest" | ||
workpath: 'C:\a\doorstop\doorstop' |
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,2 @@ | ||
python 3.8.13 | ||
poetry 1.6.1 |
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
Oops, something went wrong.