Skip to content

Added explicit array types #203

Added explicit array types

Added explicit array types #203

Workflow file for this run

name: 'Testing package'
on:
pull_request:
jobs:
py-lint:
strategy:
matrix:
cmd:
- black
- isort
- ruff
- mypy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.12"
- name: Run lint check
uses: pre-commit/action@v3.0.0
with:
extra_args: -a ${{ matrix.cmd }}
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt
override: true
- name: Check code format
run: cargo fmt -- --check --config use_try_shorthand=true,imports_granularity=Crate
clippy:
permissions:
checks: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: clippy
override: true
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: -p psqlpy --all-features -- -W clippy::all -W clippy::pedantic -D warnings
pytest:
name: ${{matrix.job.os}}-${{matrix.py_version}}
strategy:
matrix:
py_version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
job:
- os: ubuntu-latest
ssl_cmd: sudo apt-get update && sudo apt-get install libssl-dev openssl
runs-on: ${{matrix.job.os}}
steps:
- uses: actions/checkout@v1
- name: Setup Postgres
uses: ./.github/actions/setup_postgres/
with:
username: postgres
password: postgres
database: psqlpy_test
ssl_on: "on"
id: postgres
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: clippy
override: true
- name: Setup OpenSSL
run: ${{matrix.job.ssl_cmd}}
- name: Setup python for test ${{ matrix.py_version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.py_version }}
- name: Install tox
run: pip install "tox-gh>=1.2,<2"
- name: Run pytest
run: tox -v -c tox.ini