Inherit configs/discriminators from parent class + add option for discriminator to match current class #1513
Workflow file for this run
This file contains hidden or 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
| name: tests | |
| on: | |
| push: | |
| branches: | |
| - '*' | |
| pull_request: | |
| branches: | |
| - master | |
| jobs: | |
| test-code-style: | |
| name: Code style tests | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| allow-prereleases: true | |
| - name: Install dependencies | |
| run: | | |
| python -m venv .venv | |
| source .venv/bin/activate | |
| pip install -r requirements-dev.txt | |
| pip install . | |
| - name: Run ruff | |
| run: | | |
| source .venv/bin/activate | |
| ruff check mashumaro | |
| - name: Run mypy | |
| run: | | |
| source .venv/bin/activate | |
| mypy mashumaro | |
| - name: Run black | |
| run: | | |
| source .venv/bin/activate | |
| black --check . | |
| - name: Run codespell | |
| run: | | |
| source .venv/bin/activate | |
| codespell mashumaro tests .github/*.md | |
| codespell README.md --ignore-words-list brunch | |
| test-posix: | |
| name: Tests on Posix | |
| needs: | |
| - test-code-style | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| allow-prereleases: true | |
| - name: Install dependencies | |
| run: | | |
| python -m venv .venv | |
| source .venv/bin/activate | |
| pip install -r requirements-dev.txt | |
| pip install . | |
| - name: Run tests with coverage | |
| run: | | |
| source .venv/bin/activate | |
| pytest --cov=mashumaro --cov=tests --cov-report=xml | |
| - name: Upload coverage reports to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| test-windows: | |
| name: Tests on Windows | |
| needs: | |
| - test-code-style | |
| runs-on: windows-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| allow-prereleases: true | |
| - name: Install dependencies | |
| run: | | |
| python -m venv .venv | |
| .venv/Scripts/activate | |
| pip install -r requirements-dev.txt | |
| pip install . | |
| pip install tzdata | |
| - name: Run tests with coverage | |
| run: | | |
| .venv/Scripts/activate | |
| pytest --cov=mashumaro --cov=tests --cov-report=xml | |
| - name: Upload coverage reports to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} |