From 62b6362b616f80fc0b45455851b33d1c97163ae8 Mon Sep 17 00:00:00 2001 From: Mark Taylor <24257134+tmarktaylor@users.noreply.github.com> Date: Thu, 14 Sep 2023 21:20:15 -0400 Subject: [PATCH] Update ci.yml, recent_changes.md. - serialize jobs, do coverage job last - move twine check dist to build.yml. - add a 'code mode' command with --fixture to Usage tests. --- .github/workflows/ci.yml | 84 +++++++++++++++++++++------------------- docs/recent_changes.md | 7 +++- 2 files changed, 49 insertions(+), 42 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f210d80..873e065 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,7 +50,9 @@ jobs: run: | pytest -vv tests + versions: + needs: os runs-on: ubuntu-latest strategy: matrix: @@ -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 @@ -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 @@ -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) diff --git a/docs/recent_changes.md b/docs/recent_changes.md index 5adc0b9..55ba187 100644 --- a/docs/recent_changes.md +++ b/docs/recent_changes.md @@ -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