refactor: update GH_TOKEN usage in build process and tests #1253
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
| name: Citus package all platforms tests | |
| env: | |
| PACKAGING_PASSPHRASE: ${{ secrets.PACKAGING_PASSPHRASE }} | |
| MICROSOFT_EMAIL: gindibay@microsoft.com | |
| USER_NAME: Gurkan Indibay | |
| MAIN_BRANCH: all-citus | |
| PACKAGE_CLOUD_API_TOKEN: ${{ secrets.PACKAGE_CLOUD_API_TOKEN }} | |
| on: | |
| push: | |
| branches: | |
| - "**" | |
| workflow_dispatch: | |
| jobs: | |
| unit_test_execution: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: | |
| - el/9 | |
| - el/8 | |
| - ol/9 | |
| - ol/8 | |
| - debian/bullseye | |
| - debian/bookworm | |
| - debian/trixie | |
| - ubuntu/jammy | |
| - ubuntu/noble | |
| env: | |
| PLATFORM: ${{ matrix.platform }} | |
| steps: | |
| - name: Create GitHub App token | |
| id: app | |
| uses: actions/create-github-app-token@v1 | |
| with: | |
| app-id: ${{ vars.GH_APP_ID }} | |
| private-key: ${{ secrets.GH_APP_KEY }} | |
| owner: ${{ github.repository_owner }} | |
| - name: Setup git authentication for GitHub App | |
| env: | |
| GH_TOKEN: ${{ steps.app.outputs.token }} | |
| run: | | |
| git config --global url."https://x-access-token:${{ steps.app.outputs.token }}@github.com/".insteadOf "https://github.com/" | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| with: | |
| token: ${{ steps.app.outputs.token }} | |
| - name: Install dependencies | |
| run: sudo apt-get update && sudo apt-get install libcurl4-openssl-dev libssl-dev python3-testresources | |
| - name: Define git credentails | |
| run: git config --global user.email "${MICROSOFT_EMAIL}"&& git config --global user.name "${USER_NAME}" | |
| - name: Install python requirements | |
| run: python -m pip install -r packaging_automation/requirements.txt | |
| - name: Citus package tests | |
| run: python -m pytest -q packaging_automation/tests/test_citus_package.py -s |