Skip to content

Checking token format #1112

Checking token format

Checking token format #1112

Workflow file for this run

name: citus-package-tests
on:
push:
branches:
- "**"
workflow_dispatch:
inputs:
project_version:
description: "The version to be tested"
required: true
jobs:
metadata:
runs-on: ubuntu-latest
outputs:
pg_versions: ${{ steps.generate-postgres.outputs.pg_versions }}
citus_version: ${{ steps.get-citus-version.outputs.citus_version }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Package version
id: get-citus-version
run: |
echo ${{ github.event.inputs.project_version }}
echo "Version: ${{ github.event.inputs.project_version }}"
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install libcurl4-openssl-dev libssl-dev python3-testresources
- name: Install python requirements
run: python -m pip install -r packaging_automation/requirements.txt
- name: generate postgres
id: generate-postgres
run: |
export PROJECT_VERSION="${{ github.event.inputs.project_version }}"
echo "project_version: ${{ github.event.inputs.project_version }}"
# To be able to test pipeline without triggering with project_version parameter using workflow_dispatch parameter,
# if workflow_dispatch parameter is empty, 12.1.5 parameter is set to execute pipeline.
[ -z ${PROJECT_VERSION} ] && export PROJECT_VERSION=12.1.5
POSTGRES_VERSIONS=$(python -m packaging_automation.get_postgres_versions --project_version ${PROJECT_VERSION})
echo "Postgres Version: ${POSTGRES_VERSIONS}"
echo "::set-output name=pg_versions::${POSTGRES_VERSIONS}"
test_execution:
runs-on: ubuntu-latest
needs: metadata
strategy:
fail-fast: false
matrix:
platform:
- centos/8
- el/9
- ol/9
- debian/bullseye
- debian/bookworm
- ubuntu/jammy
pg: ${{ fromJson(needs.metadata.outputs.pg_versions) }}
env:
PLATFORM: ${{ matrix.platform }}
steps:
- name: Create GitHub App token
id: app
uses: actions/create-github-app-token@v2
with:
app-id: ${{ vars.GH_APP_ID }}
private-key: ${{ secrets.GH_APP_KEY }}
owner: ${{ github.repository_owner }}
- name: Set GH_TOKEN for all steps
run: echo "GH_TOKEN=${{ steps.app.outputs.token }}" >> $GITHUB_ENV
- name: Configure git with x-access-token
run: git config --global url."https://x-access-token:${{ steps.app.outputs.token }}@github.com/".insteadOf "https://github.com/"
- name: Checkout
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: Install python requirements
run: python -m pip install -r packaging_automation/requirements.txt
- name: Citus package tests
run: |
export PROJECT_VERSION="${{ github.event.inputs.project_version }}"
echo "Citus Version: ${PROJECT_VERSION} "
[ -z ${PROJECT_VERSION} ] && export PROJECT_VERSION=12.1.5
python -m packaging_automation.test_citus_package \
--project_version "${PROJECT_VERSION}" \
--os_release ${{ matrix.platform }} \
--pg_major_version ${{ matrix.pg }}