2222 pip install black
2323 - name : Check formatting
2424 run : black . -l 79 --check
25- check-version :
26- name : Check version
27- if : github.event_name == 'pull_request'
28- runs-on : ubuntu-latest
29- steps :
30- - name : Checkout code
31- uses : actions/checkout@v4
32- with :
33- fetch-depth : 0 # Fetch all history for all tags and branches
34- repository : ${{ github.event.pull_request.head.repo.full_name }}
35- ref : ${{ github.event.pull_request.head.ref }}
36- - name : Set up Python
37- uses : actions/setup-python@v5
38- with :
39- python-version : " 3.10"
40- - name : Build changelog
41- run : pip install "yaml-changelog>=0.1.7" && make changelog
42- - name : Preview changelog update
43- run : " .github/get-changelog-diff.sh"
44- - name : Check version number has been properly updated
45- run : " .github/is-version-number-acceptable.sh"
46- - name : Update changelog
47- uses : EndBug/add-and-commit@v9
48- with :
49- add : " ."
50- committer_name : Github Actions[bot]
51- author_name : Github Actions[bot]
52- message : Update PolicyEngine US data
53- github_token : ${{ secrets.POLICYENGINE_GITHUB }}
5425 test :
55- name : Build and Test
26+ name : Build and test
5627 runs-on : ubuntu-latest
5728 steps :
5829 - name : Checkout code
7142 POLICYENGINE_US_DATA_GITHUB_TOKEN : ${{ secrets.POLICYENGINE_US_DATA_GITHUB_TOKEN }}
7243 - name : Build datasets
7344 run : make data
45+ env :
46+ TEST_LITE : true
7447 - name : Run tests
7548 run : pytest
49+ - name : Test documentation builds
50+ run : make documentation
7651 publish-to-pypi :
7752 name : Publish to PyPI
7853 runs-on : ubuntu-latest
@@ -115,8 +90,31 @@ jobs:
11590 run : docker build . -f docker/policyengine_us_data.Dockerfile -t ghcr.io/policyengine/policyengine-us-data:latest
11691 - name : Push container
11792 run : docker push ghcr.io/policyengine/policyengine-us-data:latest
93+ publish-docs :
94+ name : Publish documentation
95+ runs-on : ubuntu-latest
96+ if : github.event_name == 'push' && github.ref == 'refs/heads/main'
97+ steps :
98+ - name : Checkout code
99+ uses : actions/checkout@v4
100+ with :
101+ fetch-depth : 0 # Fetch all history for all tags and branches
102+ - name : Set up Python
103+ uses : actions/setup-python@v5
104+ with :
105+ python-version : 3.12
106+ - name : Install package
107+ run : pip install -e ".[dev]"
108+ - name : Build Jupyter Book
109+ run : make documentation
110+ - name : Deploy documentation
111+ uses : JamesIves/github-pages-deploy-action@releases/v4
112+ with :
113+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
114+ BRANCH : gh-pages
115+ FOLDER : docs/_build/html
118116 upload :
119- name : Upload Data
117+ name : Upload data
120118 runs-on : ubuntu-latest
121119 needs : [lint, test]
122120 if : github.event_name == 'push' && github.ref == 'refs/heads/main'
@@ -141,12 +139,12 @@ jobs:
141139 uses : actions/upload-artifact@v4
142140 with :
143141 name : cps_2024.h5
144- path : policyengine_us_data/data_storage /cps_2024.h5
142+ path : policyengine_us_data/storage /cps_2024.h5
145143 - name : Upload ECPS 2024
146144 uses : actions/upload-artifact@v4
147145 with :
148146 name : enhanced_cps_2024.h5
149- path : policyengine_us_data/data_storage /enhanced_cps_2024.h5
147+ path : policyengine_us_data/storage /enhanced_cps_2024.h5
150148 - name : Upload data
151149 run : make upload
152150 env :
0 commit comments