Add-support-datetime-zone-info #228
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: 'Testing package' | |
on: | |
pull_request: | |
jobs: | |
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", "3.13"] | |
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 |