-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
284 additions
and
275 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
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
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 |
---|---|---|
@@ -1,74 +1,72 @@ | ||
name: CI testing | ||
|
||
# see: https://help.github.com/en/actions/reference/events-that-trigger-workflows | ||
on: # Trigger the workflow on push or pull request, but only for the main branch | ||
on: # Trigger the workflow on push or pull request, but only for the main branch | ||
push: {} | ||
pull_request: | ||
branches: [ main ] | ||
branches: [main] | ||
|
||
jobs: | ||
|
||
pytester: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, macOS-latest, windows-latest] | ||
python-version: ["3.7", "3.11"] | ||
python-version: ["3.8", "3.11"] | ||
# Timeout: https://stackoverflow.com/a/59076067/4521646 | ||
timeout-minutes: 10 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install requirements | ||
run: | | ||
pip install -r tests/requirements.txt | ||
pip list | ||
shell: bash | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Tests | ||
run: | | ||
phmdoctest README.md --outfile tests/test_readme.py | ||
python -m pytest . -v --cov=deprecate --junitxml=junit/test-results-${{ runner.os }}-${{ matrix.python-version }}.xml | ||
- name: Install requirements | ||
run: | | ||
pip install -r tests/requirements.txt | ||
pip list | ||
shell: bash | ||
|
||
- name: Upload pytest test results | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: pytest-results-${{ runner.os }}-${{ matrix.python-version }} | ||
path: junit/test-results-${{ runner.os }}-${{ matrix.python-version }}.xml | ||
if: failure() | ||
- name: Tests | ||
run: | | ||
phmdoctest README.md --outfile tests/test_readme.py | ||
python -m pytest . -v --cov=deprecate --junitxml=junit/test-results-${{ runner.os }}-${{ matrix.python-version }}.xml | ||
- name: Statistics | ||
if: success() | ||
run: | | ||
coverage report | ||
coverage xml | ||
- name: Upload pytest test results | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: pytest-results-${{ runner.os }}-${{ matrix.python-version }} | ||
path: junit/test-results-${{ runner.os }}-${{ matrix.python-version }}.xml | ||
if: failure() | ||
|
||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v3 | ||
if: success() | ||
continue-on-error: true | ||
with: | ||
# token: ${{ secrets.CODECOV_TOKEN }} | ||
file: coverage.xml | ||
flags: pytest,python${{ matrix.python-version }} | ||
fail_ci_if_error: false | ||
- name: Statistics | ||
if: success() | ||
run: | | ||
coverage report | ||
coverage xml | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v4 | ||
if: success() | ||
continue-on-error: true | ||
with: | ||
# token: ${{ secrets.CODECOV_TOKEN }} | ||
file: coverage.xml | ||
flags: pytest,python${{ matrix.python-version }} | ||
fail_ci_if_error: false | ||
|
||
testing-guardian: | ||
runs-on: ubuntu-latest | ||
needs: pytester | ||
if: always() | ||
steps: | ||
- run: echo "${{ needs.pytester.result }}" | ||
- name: failing... | ||
if: needs.pytester.result == 'failure' | ||
run: exit 1 | ||
- name: cancelled or skipped... | ||
if: contains(fromJSON('["cancelled", "skipped"]'), needs.pytester.result) | ||
timeout-minutes: 1 | ||
run: sleep 90 | ||
- run: echo "${{ needs.pytester.result }}" | ||
- name: failing... | ||
if: needs.pytester.result == 'failure' | ||
run: exit 1 | ||
- name: cancelled or skipped... | ||
if: contains(fromJSON('["cancelled", "skipped"]'), needs.pytester.result) | ||
timeout-minutes: 1 | ||
run: sleep 90 |
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 |
---|---|---|
@@ -1,18 +1,17 @@ | ||
name: Code formatting | ||
|
||
# see: https://help.github.com/en/actions/reference/events-that-trigger-workflows | ||
on: # Trigger the workflow on push or pull request, but only for the main branch | ||
on: # Trigger the workflow on push or pull request, but only for the main branch | ||
push: {} | ||
pull_request: | ||
branches: [ main ] | ||
branches: [main] | ||
|
||
jobs: | ||
|
||
typing-mypy: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.8 | ||
- name: Install mypy | ||
|
@@ -23,17 +22,17 @@ jobs: | |
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
|
||
- name: set PY | ||
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV | ||
- uses: actions/cache@v3 | ||
- uses: actions/cache@v4 | ||
with: | ||
path: ~/.cache/pre-commit | ||
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }} | ||
|
||
- uses: pre-commit/[email protected].0 | ||
- uses: pre-commit/[email protected].1 | ||
# this action also provides an additional behaviour when used in private repositories | ||
# when configured with a github token, the action will push back fixes to the pull request branch | ||
#with: | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
name: Greetings | ||
# https://github.com/marketplace/actions/first-interaction | ||
|
||
on: [issues] # pull_request | ||
on: [issues] # pull_request | ||
|
||
jobs: | ||
greeting: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/first-interaction@v1 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
issue-message: 'Hi! thanks for your contribution!, great first issue!' | ||
pr-message: 'Hey thanks for the input! Please give us a bit of time to review it!' | ||
- uses: actions/first-interaction@v1 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
issue-message: "Hi! thanks for your contribution!, great first issue!" | ||
pr-message: "Hey thanks for the input! Please give us a bit of time to review it!" |
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.