Skip to content

Commit

Permalink
Update ci.yml, recent_changes.md.
Browse files Browse the repository at this point in the history
- serialize jobs, do coverage job last
- move twine check dist to build.yml.
- add a 'code mode' command with --fixture to Usage tests.
  • Loading branch information
tmarktaylor committed Sep 15, 2023
1 parent cb09481 commit 62b6362
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 42 deletions.
84 changes: 44 additions & 40 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 @@ -79,48 +81,12 @@ jobs:
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 Down Expand Up @@ -159,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 @@ -171,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)
7 changes: 5 additions & 2 deletions docs/recent_changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,17 @@

- Initial upload to Python Package Index.

0.0.2 - 2023-09-13
0.0.2 - 2023-09-15

- Bugfix- Use new recipe in importer.py to import the fixture function.
- Add main.command().
- Remove import io, sys, contextlib from generated testfile.
- Catch exception raised by --replmode --fixture.
- Add FCB info string "expected-output" to indicate expected output.
- Add patch point to change info strings that indicate expected output.
- Indicate expected output was checked with "o" in --log location.
- Markdown linting.
- Moved options.entry_points to setup.cfg and removed setup.py.
- Markdown linting.
- Setup classifiers, cleanups, Docs, renames.
- Move twine check to build.yml.
- serialize ci.yml jobs

0 comments on commit 62b6362

Please sign in to comment.