ci: fix Python 3.9 CI failures (x402 requires >=3.10) #59
This file contains hidden or 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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ['3.9', '3.11', '3.12'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| if python3 -c "import sys; exit(0 if sys.version_info >= (3, 10) else 1)"; then | |
| pip install -e ".[dev,solana]" | |
| else | |
| pip install -e ".[dev]" | |
| fi | |
| - name: Check formatting | |
| run: black --check . | |
| - name: Lint | |
| run: ruff check . | |
| - name: Run unit tests | |
| run: | | |
| if python3 -c "import sys; exit(0 if sys.version_info >= (3, 10) else 1)"; then | |
| pytest tests/unit | |
| else | |
| pytest tests/unit --ignore=tests/unit/test_solana_client.py --ignore=tests/unit/test_solana_wallet.py -k "not SolanaX402" | |
| fi |