Strengthen account_do tests and publishing checks
Add static coverage for module configuration, XML inventory, tax views, translations, migration metadata, and the Gitea publishing workflow. Make Gitea Actions run install, compileall, unittest, build, and twine check before publishing packages from series branches. Fix packaging documentation and RST rendering issues so package validation passes before upload.
This commit is contained in:
@@ -1,14 +1,53 @@
|
||||
name: Publish Package
|
||||
name: Test and Publish Package
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "**"
|
||||
pull_request:
|
||||
branches:
|
||||
- "**"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.11"
|
||||
|
||||
- name: Install package and test dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
python -m pip install -e '.[test]'
|
||||
|
||||
- name: Compile Python sources
|
||||
run: |
|
||||
python -m compileall .
|
||||
|
||||
- name: Run module tests
|
||||
run: |
|
||||
python -m unittest discover -s tests -p 'test*.py'
|
||||
|
||||
- name: Build package
|
||||
run: |
|
||||
python -m pip install build twine
|
||||
python -m build
|
||||
|
||||
- name: Check package
|
||||
run: |
|
||||
python -m twine check dist/*
|
||||
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
needs: test
|
||||
if: github.event_name != 'pull_request'
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
|
||||
Reference in New Issue
Block a user