build: use importlib (pkg_resources is deprecated) #203
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: Python package | |
on: | |
push: | |
pull_request: | |
jobs: | |
lint: | |
name: lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- name: Install dependencies | |
run: python3 -m pip install ".[dev]" | |
- name: Check style | |
run: python3 -m ruff check . && python3 -m ruff format --check . | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.10", "3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: awalsh128/cache-apt-pkgs-action@latest | |
with: | |
packages: zsh | |
version: 1.0 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: pip | |
cache-dependency-path: '**/setup.cfg' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install --use-deprecated=legacy-resolver '.[test,postgres,snowflake,queueing]' | |
- name: Test with pytest | |
run: pytest tests/storage/test_snowflake.py |