11name : Tool Tests
22
33env :
4- GH_TOKEN : ${{ secrets.GH_TOKEN }}
54 MICROSOFT_EMAIL : gindibay@microsoft.com
65 USER_NAME : Gurkan Indibay
76 MAIN_BRANCH : all-citus
@@ -25,12 +24,24 @@ jobs:
2524
2625 unit_test_execution :
2726 runs-on : ubuntu-latest
27+ permissions :
28+ contents : read
2829
2930 steps :
31+
32+ - name : Create GitHub App token
33+ id : app
34+ uses : actions/create-github-app-token@v1
35+ with :
36+ app-id : ${{ vars.GH_APP_ID }}
37+ private-key : ${{ secrets.GH_APP_KEY }}
38+ owner : ${{ github.repository_owner }}
39+
3040 - name : Checkout repository
3141 uses : actions/checkout@v3
3242 with :
3343 fetch-depth : 0
44+ token : ${{ steps.app.outputs.token }}
3445
3546 - name : Set up Python 3.10
3647 uses : actions/setup-python@v5
@@ -53,20 +64,35 @@ jobs:
5364 run : black . --check
5465
5566 - name : Unit tests for "Common tools"
67+ env :
68+ GH_TOKEN : ${{steps.app.outputs.token}}
69+ GITHUB_TOKEN : ${{steps.app.outputs.token}}
5670 run : python -m pytest -q packaging_automation/tests/test_common_tool_methods.py
5771
5872 - name : Unit tests for "Update Package Properties"
73+ env :
74+ GH_TOKEN : ${{steps.app.outputs.token}}
75+ GITHUB_TOKEN : ${{steps.app.outputs.token}}
5976 run : python -m pytest -q packaging_automation/tests/test_update_package_properties.py
6077
6178 # no longer viable, outdated test, skipping to not block the pipeline
6279 # - name: Unit tests for "Prepare Release"
6380 # run: python -m pytest -q packaging_automation/tests/test_prepare_release.py
6481
6582 - name : Unit tests for "Update Docker"
83+ env :
84+ GH_TOKEN : ${{steps.app.outputs.token}}
85+ GITHUB_TOKEN : ${{steps.app.outputs.token}}
6686 run : python -m pytest -q packaging_automation/tests/test_update_docker.py
6787
6888 - name : Unit tests for "Update Pgxn"
89+ env :
90+ GH_TOKEN : ${{steps.app.outputs.token}}
91+ GITHUB_TOKEN : ${{steps.app.outputs.token}}
6992 run : python -m pytest -q packaging_automation/tests/test_update_pgxn.py
7093
7194 - name : Packaging Warning Handler
95+ env :
96+ GH_TOKEN : ${{steps.app.outputs.token}}
97+ GITHUB_TOKEN : ${{steps.app.outputs.token}}
7298 run : python -m pytest -q packaging_automation/tests/test_packaging_warning_handler.py
0 commit comments