fix(deps): update rust crate pyo3 to 0.23.0 #3987
Workflow file for this run
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: Test and lint | |
on: | |
push: | |
merge_group: | |
schedule: | |
- cron: '0 10 * * 2' | |
#pull_request: | |
workflow_dispatch: | |
repository_dispatch: | |
types: [trigger_checks] | |
jobs: | |
lint: | |
name: Format, lint, and type check | |
runs-on: macos-15 | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
- name: Cache cargo and rust build | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
rust/target/ | |
key: pytest-rust-target-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}-${{ github.run_id }} | |
restore-keys: | | |
pytest-rust-target-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}- | |
pytest-rust-target-${{ runner.os }}- | |
- name: Setup uv | |
uses: astral-sh/setup-uv@v5 | |
- name: Install artistools | |
run: | | |
uv sync --frozen | |
source .venv/bin/activate | |
uv pip install --compile-bytecode --editable .[dev] | |
- name: Run Ruff | |
if: always() | |
uses: astral-sh/ruff-action@v3 | |
with: | |
args: "check --exit-non-zero-on-fix --no-fix" | |
- name: Run Ruff Format | |
if: always() | |
uses: astral-sh/ruff-action@v3 | |
with: | |
args: "format --check" | |
- name: Run mypy | |
if: always() | |
run: uv run --frozen -- mypy --install-types --non-interactive | |
- name: Run pyright | |
if: always() | |
run: uv run --frozen -- pyright | |
- name: Run pylint | |
if: always() | |
run: uv run --frozen -- pylint --output-format=github artistools | |
- name: Cache pre-commit | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pre-commit | |
key: pre-commit-3|${{ hashFiles('.pre-commit-config.yaml') }} | |
- name: Run pre-commit | |
run: | | |
source .venv/bin/activate | |
uv run --frozen -- pre-commit run --all-files --show-diff-on-failure --color=always | |
superlinter: | |
name: Super linter | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
with: | |
# Full git history is needed to get a proper list of changed files within `super-linter` | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
- name: Lint Code Base | |
uses: github/super-linter/slim@v7 | |
env: | |
LINTER_RULES_PATH: ./ | |
LOG_LEVEL: WARN | |
VALIDATE_JSON_PRETTIER: false | |
VALIDATE_GITHUB_ACTIONS: false | |
VALIDATE_GITLEAKS: false | |
VALIDATE_JSCPD: false | |
VALIDATE_PYTHON_BLACK: false | |
VALIDATE_CHECKOV: false | |
VALIDATE_MARKDOWN_PRETTIER: false | |
VALIDATE_PYTHON_FLAKE8: false | |
VALIDATE_PYTHON_ISORT: false | |
VALIDATE_PYTHON_PYINK: false | |
VALIDATE_PYTHON_PYLINT: false | |
VALIDATE_PYTHON_MYPY: false | |
VALIDATE_PYTHON_RUFF: false | |
VALIDATE_YAML_PRETTIER: false | |
YAML_ERROR_ON_WARNING: false | |
DEFAULT_BRANCH: main | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
pytest: | |
timeout-minutes: 30 | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-15, ubuntu-24.04] | |
python-version: ['3.10', '3.11', '3.12', '3.13'] | |
env: | |
OS: ${{ matrix.os }} | |
PYTHON: ${{ matrix.python-version }} | |
name: pytest ${{ matrix.os }} python ${{ matrix.python-version }} | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
check-latest: true | |
- name: Show python version | |
run: python3 --version --version && which python3 | |
- name: Cache cargo and rust build | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
rust/target/ | |
key: pytest-rust-target-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}-${{ github.run_id }} | |
restore-keys: | | |
pytest-rust-target-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}- | |
pytest-rust-target-${{ runner.os }}- | |
- name: Setup uv | |
uses: astral-sh/setup-uv@v5 | |
- name: Install artistools (no dev deps) | |
run: | | |
uv sync --frozen --no-dev | |
uv pip install . | |
- name: Check artistools command line tool | |
run: | | |
uv run --frozen -- artistools --help | |
uv run --frozen -- artistools completions | |
- name: Cache test data | |
uses: actions/cache@v4 | |
with: | |
enableCrossOsArchive: true | |
path: tests/data/*.tar.xz | |
key: testdata20231114 | |
- name: Download/extract test data | |
working-directory: tests/data/ | |
run: source ./setuptestdata.sh | |
- name: Install artistools[dev] | |
run: | | |
uv sync --frozen | |
uv pip install --compile-bytecode --editable .[dev] | |
- name: Test with pytest | |
run: uv run --frozen -- python3 -m pytest --cov=./ --cov-report=xml | |
- name: Report coverage | |
run: uv run --frozen -- python3 -m coverage report | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v5 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ./coverage.xml | |
# directory: ./coverage/reports/ | |
flags: unittests | |
env_vars: OS,PYTHON | |
name: codecov-umbrella | |
fail_ci_if_error: false | |
# path_to_write_report: ./coverage/codecov_report.txt | |
verbose: true | |
- name: Upload output files | |
uses: actions/upload-artifact@v4 | |
with: | |
name: testoutput-${{ matrix.os }}-py${{ matrix.python-version }} | |
path: tests/output/ |