Update package version #37
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
| # Workflow that runs on code changes after merge to main. | |
| name: Code changes | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - pyproject.toml | |
| env: | |
| HUGGING_FACE_TOKEN: ${{ secrets.HUGGING_FACE_TOKEN }} | |
| POLICYENGINE_US_DATA_GITHUB_TOKEN: ${{ secrets.POLICYENGINE_US_DATA_GITHUB_TOKEN }} | |
| jobs: | |
| Lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Check formatting | |
| uses: "lgeiger/black-action@master" | |
| with: | |
| args: ". -l 79 --check" | |
| Test: | |
| permissions: | |
| contents: "read" | |
| # Required to auth against gcp | |
| id-token: "write" | |
| runs-on: larger-runner | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v2 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| - name: Set up Python | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: '3.11' | |
| - uses: "google-github-actions/auth@v2" | |
| with: | |
| workload_identity_provider: "projects/322898545428/locations/global/workloadIdentityPools/policyengine-research-id-pool/providers/prod-github-provider" | |
| service_account: "policyengine-research@policyengine-research.iam.gserviceaccount.com" | |
| - name: Install package | |
| run: uv pip install -e .[dev] --system | |
| - name: Download data inputs | |
| run: make download | |
| - name: Build datasets | |
| run: make data | |
| env: | |
| PYTHON_LOG_LEVEL: INFO | |
| - name: Run tests | |
| run: pytest | |
| - name: Upload data | |
| run: make upload | |
| - name: Test documentation builds | |
| run: make documentation |