Update ci.yml #28
Workflow file for this run
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
| # This workflow will install Python dependencies, run tests and lint with a variety of Python versions | |
| # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
| name: Python package | |
| on: | |
| push: | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.11", "3.13"] | |
| steps: | |
| - name: Generate a token | |
| id: generate-token | |
| uses: actions/create-github-app-token@v2 | |
| with: | |
| app-id: ${{ secrets.GH_APP_ID }} | |
| private-key: ${{ secrets.GH_APP_PRIVATE_KEY }} | |
| owner: ${{ github.repository_owner }} | |
| repositories: | | |
| aws-durable-execution-sdk-python | |
| aws-durable-execution-sdk-python-testing | |
| - uses: actions/checkout@v5 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| persist-credentials: false | |
| - name: Install Hatch | |
| run: | | |
| python -m pip install --upgrade hatch | |
| python -m pip install --force-reinstall -v "click==8.2.1" | |
| - name: static analysis | |
| run: hatch fmt --check | |
| - name: set up git in pyproject.toml | |
| run: sed -i "s|git\+ssh\:\/\/git@github\.com\/aws\/aws\-durable\-execution\-sdk\-python\.git|https://x-access-token:${{ steps.generate-token.outputs.token }}@github.com/aws/aws-durable-execution-sdk-python.git|" pyproject.toml | |
| - name: type checking | |
| run: hatch run types:check | |
| - name: Run tests + coverage | |
| run: hatch run test:cov | |
| - name: Build distribution | |
| run: hatch build |