diff --git a/.github/workflows/downstream-compatibility.yml b/.github/workflows/downstream-compatibility.yml new file mode 100644 index 0000000..d5f9d1a --- /dev/null +++ b/.github/workflows/downstream-compatibility.yml @@ -0,0 +1,61 @@ +name: Downstream Compatibility + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + test-policyengine-us-data: + name: Test policyengine-us-data compatibility + runs-on: ubuntu-latest + + steps: + - name: Checkout microimpute + uses: actions/checkout@v4 + with: + path: microimpute + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.12' + + - name: Install microimpute from current branch + run: | + cd microimpute + pip install -e . + + - name: Checkout policyengine-us-data + uses: actions/checkout@v4 + with: + repository: PolicyEngine/policyengine-us-data + path: policyengine-us-data + + - name: Install policyengine-us-data dependencies + run: | + cd policyengine-us-data + pip install -e . + + - name: Run Build Datasets test + env: + HUGGING_FACE_TOKEN: ${{ secrets.HUGGING_FACE_TOKEN }} + run: | + cd policyengine-us-data + # Download required data files + TEST_LITE=True make download + # Build datasets - this will test microimpute integration + TEST_LITE=True make data + + - name: Post comment on failure + if: failure() + uses: actions/github-script@v7 + with: + script: | + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: '⚠️ This change may break policyengine-us-data. Please check the [Build Datasets test results](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}).' + }) \ No newline at end of file diff --git a/changelog_entry.yaml b/changelog_entry.yaml index e69de29..aebe819 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -0,0 +1,4 @@ +- bump: minor + changes: + added: + - Downstream compatibility CI workflow to test policyengine-us-data integration