feat: add generated README to the client-lib template (#16) #33
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: | |
| pull_request: | |
| branches: [main] | |
| push: | |
| branches: [main] | |
| concurrency: | |
| group: ci-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| unit: | |
| name: unit | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| cache: pip | |
| cache-dependency-path: sdk/pyproject.toml | |
| - name: Install dependencies | |
| working-directory: ./sdk | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install -e .[dev] | |
| - name: Run unit tests | |
| working-directory: ./sdk | |
| run: pytest tests -m "not e2e" | |
| codegen: | |
| name: codegen | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| cache: pip | |
| cache-dependency-path: sdk/pyproject.toml | |
| - name: Setup tx3 toolchain | |
| uses: tx3-lang/actions/setup@v1 | |
| - name: Render and verify codegen plugin | |
| run: bash .github/scripts/codegen-check.sh | |
| e2e: | |
| name: e2e | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| env: | |
| TRP_ENDPOINT_PREPROD: ${{ secrets.TRP_ENDPOINT_PREPROD }} | |
| TRP_API_KEY_PREPROD: ${{ secrets.TRP_API_KEY_PREPROD }} | |
| TEST_PARTY_A_ADDRESS: ${{ secrets.TEST_PARTY_A_ADDRESS }} | |
| TEST_PARTY_A_MNEMONIC: ${{ secrets.TEST_PARTY_A_MNEMONIC }} | |
| TEST_PARTY_B_ADDRESS: ${{ secrets.TEST_PARTY_B_ADDRESS }} | |
| TEST_PARTY_B_MNEMONIC: ${{ secrets.TEST_PARTY_B_MNEMONIC }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| cache: pip | |
| cache-dependency-path: sdk/pyproject.toml | |
| - name: Install dependencies | |
| working-directory: ./sdk | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install -e .[dev] | |
| - name: Validate e2e secrets | |
| run: | | |
| for name in TRP_ENDPOINT_PREPROD TRP_API_KEY_PREPROD TEST_PARTY_A_ADDRESS TEST_PARTY_A_MNEMONIC TEST_PARTY_B_ADDRESS TEST_PARTY_B_MNEMONIC; do | |
| if [ -z "${!name}" ]; then | |
| echo "Missing required e2e env var: $name" | |
| exit 1 | |
| fi | |
| done | |
| - name: Run e2e tests | |
| working-directory: ./sdk | |
| run: pytest tests/e2e -m e2e |