add ruff and pre-commit hooks #873
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 things on pushes | |
on: [push, pull_request] | |
jobs: | |
lint-and-test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.8, 3.12] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Setup Poetry | |
uses: Gr1N/setup-poetry@v9 | |
- name: Install deps | |
run: poetry install --extras "dev" --extras "types" | |
- name: Lint with mypy | |
run: | | |
poetry run mypy aleph_alpha_client | |
poetry run mypy tests --ignore-missing-imports | |
- name: Run tests | |
run: | | |
poetry run pytest | |
env: | |
TEST_API_URL: ${{ secrets.TEST_API_URL }} | |
TEST_TOKEN: ${{ secrets.TEST_TOKEN }} |