update tox configuration #13
This file contains 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: CI | |
on: | |
push: | |
branches: ["master", "with_pr_fixes"] | |
pull_request: | |
branches: ["master"] | |
# Allow rebuilds via API. | |
repository_dispatch: | |
types: rebuild | |
jobs: | |
tests: | |
name: "Python ${{ matrix.python-version }} on ${{ matrix.platform }}" | |
runs-on: "${{ matrix.platform }}" | |
env: | |
USING_COVERAGE: '3.12' | |
strategy: | |
matrix: | |
platform: ["ubuntu-latest"] | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13-dev"] | |
steps: | |
- uses: "actions/checkout@v3" | |
- uses: "actions/setup-python@v4" | |
with: | |
python-version: "${{ matrix.python-version }}" | |
- name: "Install dependencies" | |
run: | | |
python -VV | |
python -m site | |
python -m pip install --upgrade pip setuptools wheel | |
python -m pip install --upgrade virtualenv tox tox-gh-actions | |
- name: "Run tox targets for ${{ matrix.python-version }}" | |
run: "python -m tox" | |
env: | |
PLATFORM: ${{ matrix.platform }} | |
package: | |
name: "Build & verify package" | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: "actions/checkout@v3" | |
- uses: "actions/setup-python@v4" | |
with: | |
python-version: "3.12" | |
- name: "Install build and twine" | |
run: "python -m pip install build twine" | |
- name: "Build package" | |
run: "python -m build ." | |
- name: "List result" | |
run: "ls -l dist" | |
- name: "Check long_description" | |
run: "python -m twine check dist/*" | |
install-dev: | |
strategy: | |
matrix: | |
os: ["ubuntu-latest", "windows-latest", "macos-latest"] | |
name: "Verify dev env" | |
runs-on: "${{ matrix.os }}" | |
steps: | |
- uses: "actions/checkout@v3" | |
- uses: "actions/setup-python@v4" | |
with: | |
python-version: "3.12" | |
- name: "Install in dev mode" | |
run: "python -m pip install -e .[dev]" | |
- name: "Import package" | |
run: "python -c 'import rest_framework_yaml; print(rest_framework_yaml.__version__)'" |