Skip to content

Commit

Permalink
Merge pull request #5 from tmarktaylor/develop
Browse files Browse the repository at this point in the history
Merge develop to main for next version.
  • Loading branch information
tmarktaylor authored Sep 15, 2023
2 parents aa9c9e2 + 472ff3d commit 2935e2b
Show file tree
Hide file tree
Showing 127 changed files with 1,561 additions and 902 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ jobs:
- name: Build dist
run: |
python -m pip install build --user
python -m pip install twine --user
python -m build
python -m pip hash dist/*
twine check dist/*
- name: Upload dist
uses: actions/upload-artifact@v3
Expand Down
89 changes: 47 additions & 42 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ jobs:
run: |
pytest -vv tests
versions:
needs: os
runs-on: ubuntu-latest
strategy:
matrix:
Expand Down Expand Up @@ -78,48 +80,13 @@ jobs:
phmutest docs/advanced/skipif.md --log
phmutest docs/advanced/label.md --log
phmutest docs/advanced/labelanyfcb.md --log
phmutest tests/md/optionflags.md --log --replmode --fixture tests.test_patching.setflags
phmutest docs/fix/code/globdemo.md --fixture docs.fix.code.globdemo.init_globals --log
phmutest tests/md/project.md --report
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.x
id: setuppython
uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Install phmutest
run: |
python -m pip install --upgrade pip
pip install coverage
pip install -r tests/requirements.txt
pip freeze
- name: Tests, coverage report
run: |
coverage erase
coverage run --branch --source=src -m phmutest --version
coverage run --branch --source=src --append -m phmutest README.md --report
coverage run --branch --source=src --append -m phmutest README.md
coverage run --branch --source=src --append -m pytest -vv tests
coverage report --show-missing
coverage xml
env:
PYTHONPATH: ${{ github.workspace }}/src
continue-on-error: true

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml # optional
flags: pytest,python-${{ steps.setuppython.outputs.python-version }},ubuntu-latest # optional
name: codecov-umbrella # optional
fail_ci_if_error: false # optional (default = false)
verbose: true # optional (default = false)

inspect:
needs: versions
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -144,8 +111,8 @@ jobs:
# Subsequent steps run with the modified files.
# Don't run black on the generated test files.
run: |
black **/*.py --check --force-exclude "tests.py.generated.*py"
black **/*.py --force-exclude "tests.py.generated.*py"
black **/*.py --check --force-exclude="tests/py"
black **/*.py --force-exclude="tests/py"
continue-on-error: true
- name: Code Style
run: |
Expand All @@ -158,8 +125,6 @@ jobs:
- name: Deployable
run: |
python tests/check_classifiers.py
python setup.py sdist
twine check dist/*
- name: Docs
run: |
python docs/premkdocs.py
Expand All @@ -170,3 +135,43 @@ jobs:
name: site
path: site
retention-days: 5


coverage:
needs: inspect
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.x
id: setuppython
uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Install phmutest
run: |
python -m pip install --upgrade pip
pip install coverage
pip install -r tests/requirements.txt
pip freeze
- name: Tests, coverage report
run: |
coverage erase
coverage run --branch --source=src -m phmutest --version
coverage run --branch --source=src --append -m phmutest README.md --report
coverage run --branch --source=src --append -m phmutest README.md
coverage run --branch --source=src --append -m pytest -vv tests
coverage report --show-missing
coverage xml
env:
PYTHONPATH: ${{ github.workspace }}/src
continue-on-error: true

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml # optional
flags: pytest,python-${{ steps.setuppython.outputs.python-version }},ubuntu-latest # optional
name: codecov-umbrella # optional
fail_ci_if_error: false # optional (default = false)
verbose: true # optional (default = false)
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
workflow_dispatch:

env:
ref: v0.0.1
ref: v0.0.2

jobs:
builddist:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ on:
workflow_dispatch:

env:
version: 0.0.1
project: phmutest
version: 0.0.2
command: phmutest

jobs:
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
# PyCharm
.idea/

# IDE
.vscode/

# Mkdocs
site
_mkdocsin
Expand Down
Loading

0 comments on commit 2935e2b

Please sign in to comment.