docs: fix stale Base chain references (Arbitrum) #7
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] | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install ruff | |
| run: pip install ruff | |
| - name: Check linting | |
| run: ruff check src/ tests/ | |
| - name: Check formatting | |
| run: ruff format --check src/ tests/ | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12", "3.13"] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: pip install -e ".[dev]" | |
| - name: Build wheel | |
| run: | | |
| pip install build | |
| python -m build | |
| - name: Check build artifacts | |
| run: | | |
| ls -la dist/ | |
| test -f dist/*.whl | |
| test -f dist/*.tar.gz | |
| - name: Run unit tests | |
| run: pytest tests/unit -v | |
| integration-tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install dependencies | |
| run: pip install -e ".[dev]" | |
| - name: Check if secrets are available | |
| env: | |
| RPC_SECRET: ${{ secrets.BASE_SEPOLIA_RPC_URL }} | |
| run: | | |
| if [ -z "$RPC_SECRET" ]; then | |
| echo "::error::Integration test secrets are not configured!" | |
| echo "::error::Configure required secrets: BASE_SEPOLIA_RPC_URL, TEST_PRIVATE_KEY" | |
| echo "::error::Configure required variables: PERP_MANAGER_ADDRESS, USDC_ADDRESS, TEST_PERP_ID" | |
| exit 1 | |
| fi | |
| echo "Integration test configuration found - running tests" | |
| - name: Create .env.local for integration tests | |
| env: | |
| RPC_URL_VAL: ${{ secrets.BASE_SEPOLIA_RPC_URL }} | |
| PRIVATE_KEY_VAL: ${{ secrets.TEST_PRIVATE_KEY }} | |
| PERP_MANAGER_VAL: ${{ vars.PERP_MANAGER_ADDRESS }} | |
| USDC_VAL: ${{ vars.USDC_ADDRESS }} | |
| PERP_ID_VAL: ${{ vars.TEST_PERP_ID }} | |
| run: | | |
| cat > .env.local << EOF | |
| RPC_URL=${RPC_URL_VAL} | |
| PRIVATE_KEY=${PRIVATE_KEY_VAL} | |
| PERP_MANAGER_ADDRESS=${PERP_MANAGER_VAL} | |
| USDC_ADDRESS=${USDC_VAL} | |
| CHAIN_ID=84532 | |
| TEST_PERP_ID=${PERP_ID_VAL} | |
| EOF | |
| - name: Run integration tests | |
| env: | |
| RPC_URL: ${{ secrets.BASE_SEPOLIA_RPC_URL }} | |
| PRIVATE_KEY: ${{ secrets.TEST_PRIVATE_KEY }} | |
| PERP_MANAGER_ADDRESS: ${{ vars.PERP_MANAGER_ADDRESS }} | |
| USDC_ADDRESS: ${{ vars.USDC_ADDRESS }} | |
| TEST_PERP_ID: ${{ vars.TEST_PERP_ID }} | |
| run: pytest tests/integration -v -m integration | |
| - name: Clean up .env.local | |
| if: always() | |
| run: rm -f .env.local |