-
Notifications
You must be signed in to change notification settings - Fork 15
81 lines (74 loc) · 2.88 KB
/
package-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
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.0.0 parameter is set to execute pipeline.
[ -z ${PROJECT_VERSION} ] && export PROJECT_VERSION=12.0.0
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/focal
- ubuntu/jammy
pg: ${{ fromJson(needs.metadata.outputs.pg_versions) }}
env:
PLATFORM: ${{ matrix.platform }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- 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.0.0
python -m packaging_automation.test_citus_package \
--project_version "${PROJECT_VERSION}" \
--os_release ${{ matrix.platform }} \
--pg_major_version ${{ matrix.pg }}