Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run the nightly CI tests on the release branch #7628

20 changes: 19 additions & 1 deletion .github/workflows/abi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
run: python .github/gh_config_reader.py

abi_test:
name: ABI Test ${{ matrix.dir }} PG${{ matrix.pg }}
name: ABI Test ${{ matrix.dir }} PG${{ matrix.pg }} Env:${{ matrix.env }}
runs-on: ubuntu-latest
needs: config
strategy:
Expand All @@ -59,12 +59,30 @@ jobs:
- pg: 17
builder: ${{ fromJson(needs.config.outputs.pg17_abi_min) }}-alpine
tester: ${{ fromJson(needs.config.outputs.pg17_latest) }}-alpine3.19
env:
- development
- staging

steps:

- name: Checkout TimescaleDB
uses: actions/checkout@v4

- name: Set BRANCH as per environment
run: |
if [[ "${{ matrix.env }}" == "staging" ]] ;
then
OLD_MINOR_VERSION=$(tail -1 version.config | cut -d ' ' -f 3 | cut -d '-' -f 1)
echo "BRANCH="$(echo ${OLD_MINOR_VERSION%?}x)" >> $GITHUB_ENV
else
echo "BRANCH="${{ matrix.env.BRANCH }}"" >> $GITHUB_ENV
fi

- name: Checkout TimescaleDB
uses: actions/checkout@v4
with:
ref: ${{ env.BRANCH }}

- name: Build extension with ${{ matrix.builder }}
run: |
BUILDER_IMAGE="postgres:${{matrix.builder}}"
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/apt-arm-packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,15 @@ name: APT ARM64 packages
- release_test
- trigger/package_test
workflow_dispatch:
workflow_call:
inputs:
branch:
description: 'Branch to checkout'
type: string
default: 'main'
jobs:
apt_tests:
name: APT ARM64 ${{ matrix.image }} PG${{ matrix.pg }}
name: APT ARM64 ${{ matrix.image }} PG${{ matrix.pg }} timescaledb${{ github.event.inputs.branch }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
name: APT ARM64 ${{ matrix.image }} PG${{ matrix.pg }} timescaledb${{ github.event.inputs.branch }}
name: APT ARM64 ${{ matrix.image }} PG${{ matrix.pg }} timescaledb:${{ github.event.inputs.branch }}

runs-on: ubuntu-22.04
strategy:
fail-fast: false
Expand Down Expand Up @@ -65,6 +71,8 @@ jobs:
EOF

- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch }}

- name: Read versions
id: versions
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/apt-packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,15 @@ name: APT packages
- release_test
- trigger/package_test
workflow_dispatch:
workflow_call:
inputs:
branch:
description: 'Branch to checkout'
type: string
default: 'main'
jobs:
apt_tests:
name: APT ${{ matrix.image }} PG${{ matrix.pg }} ${{ matrix.license }}
name: APT ${{ matrix.image }} PG${{ matrix.pg }} timescaledb${{ github.event.inputs.branch }} ${{ matrix.license }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
name: APT ${{ matrix.image }} PG${{ matrix.pg }} timescaledb${{ github.event.inputs.branch }} ${{ matrix.license }}
name: APT ${{ matrix.image }} PG${{ matrix.pg }} ${{ matrix.license }} timescaledb:${{ github.event.inputs.branch }}

runs-on: ubuntu-latest
container:
image: ${{ matrix.image }}
Expand Down Expand Up @@ -59,6 +65,8 @@ jobs:
dpkg -L timescaledb-2${{ matrix.pkg_suffix }}-postgresql-${{ matrix.pg }}

- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch }}

- name: Read versions
id: versions
Expand Down
14 changes: 12 additions & 2 deletions .github/workflows/coverity.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,26 @@ name: Coverity
branches:
- coverity_scan
workflow_dispatch:
workflow_call:
inputs:
branch:
description: 'Branch to checkout'
type: string
default: 'main'

jobs:

coverity:
name: Coverity ${{ matrix.pg }}
name: Coverity ${{ matrix.pg }} timescaledb${{ github.event.inputs.branch }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
name: Coverity ${{ matrix.pg }} timescaledb${{ github.event.inputs.branch }}
name: Coverity ${{ matrix.pg }} timescaledb:${{ github.event.inputs.branch }}

runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# run only on the 3 latest PG versions as we have rate limit on coverity
pg: [15, 16, 17]
os: [ubuntu-20.04]
steps:

steps:
- name: Install Dependencies
run: |
sudo apt-get update
Expand All @@ -29,6 +37,8 @@ jobs:

- name: Checkout TimescaleDB
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch }}

- name: Coverity tools
run: |
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/docker-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,15 @@ name: Test Docker images
- release_test
- trigger/package_test
workflow_dispatch:
workflow_call:
inputs:
branch:
description: 'Branch to checkout'
type: string
default: 'main'
jobs:
docker_tests:
name: ${{ matrix.image }}
name: ${{ matrix.image }} timescaledb${{ github.event.inputs.branch }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
name: ${{ matrix.image }} timescaledb${{ github.event.inputs.branch }}
name: ${{ matrix.image }} timescaledb:${{ github.event.inputs.branch }}

runs-on: ubuntu-latest
services:
ts:
Expand Down Expand Up @@ -50,6 +56,8 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch }}

- name: Read versions
id: versions
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/homebrew.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ name: Homebrew
- trigger/package_test
- trigger/homebrew_test
workflow_dispatch:

workflow_call:
inputs:
branch:
description: 'Branch to checkout'
type: string
default: 'main'
jobs:
homebrew:
name: Homebrew
Expand Down Expand Up @@ -43,8 +48,10 @@ jobs:

# checkout code to get version information
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch }}

- name: Test Installation
- name: Test Installation for timescaledb${{ github.event.inputs.branch }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- name: Test Installation for timescaledb${{ github.event.inputs.branch }}
- name: Test Installation for timescaledb:${{ github.event.inputs.branch }}

run: |
psql -X -c "CREATE EXTENSION timescaledb;" postgres
psql -X -c "SELECT extname,extversion,version() FROM pg_extension WHERE extname='timescaledb';" postgres
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/libfuzzer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ name: Libfuzzer
- .github/workflows/libfuzzer.yaml
- 'tsl/test/fuzzing/compression/**'
workflow_dispatch:
workflow_call:
inputs:
branch:
description: 'Branch to checkout'
type: string
default: 'main'

jobs:
build:
Expand All @@ -33,6 +39,8 @@ jobs:

- name: Checkout TimescaleDB
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch }}

- name: Read configuration
id: config
Expand Down Expand Up @@ -145,6 +153,8 @@ jobs:

- name: Checkout TimescaleDB
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch }}

- name: Download the installation directory
uses: actions/download-artifact@v4
Expand Down
13 changes: 12 additions & 1 deletion .github/workflows/linux-32bit-build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ name: Regression Linux i386
- '**.md'
- 'LICENSE*'
- NOTICE
workflow_call:
inputs:
branch:
description: 'Branch to checkout'
type: string
default: 'main'
jobs:
config:
runs-on: ubuntu-latest
Expand All @@ -28,12 +34,15 @@ jobs:
steps:
- name: Checkout source code
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch }}

- name: Read configuration
id: setter
run: python .github/gh_config_reader.py

regress_linux_32bit:
name: PG${{ matrix.pg }} ${{ matrix.build_type }} linux-i386
name: PG${{ matrix.pg }} ${{ matrix.build_type }} linux-i386 timescaledb${{ github.event.inputs.branch }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
name: PG${{ matrix.pg }} ${{ matrix.build_type }} linux-i386 timescaledb${{ github.event.inputs.branch }}
name: PG${{ matrix.pg }} ${{ matrix.build_type }} linux-i386 timescaledb:${{ github.event.inputs.branch }}

runs-on: ubuntu-latest
needs: config
container:
Expand Down Expand Up @@ -76,6 +85,8 @@ jobs:

- name: Checkout TimescaleDB
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch }}

# We are going to rebuild Postgres daily, so that it doesn't suddenly break
# ages after the original problem.
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/rpm-packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,15 @@ name: RPM packages
- release_test
- trigger/package_test
workflow_dispatch:

workflow_call:
inputs:
branch:
description: 'Branch to checkout'
type: string
default: 'main'
jobs:
rpm_tests:
name: RPM ${{ matrix.image }} PG${{ matrix.pg }} ${{ matrix.license }}
name: RPM ${{ matrix.image }} PG${{ matrix.pg }} ${{ matrix.license }} timescaledb${{ github.event.inputs.branch }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
name: RPM ${{ matrix.image }} PG${{ matrix.pg }} ${{ matrix.license }} timescaledb${{ github.event.inputs.branch }}
name: RPM ${{ matrix.image }} PG${{ matrix.pg }} ${{ matrix.license }} timescaledb:${{ github.event.inputs.branch }}

runs-on: ubuntu-latest
container:
image: ${{ matrix.image }}
Expand Down Expand Up @@ -66,6 +71,8 @@ jobs:
rpm -ql timescaledb-2${{ matrix.pkg_suffix }}-postgresql-${{ matrix.pg }}

- uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.branch }}

- name: Read versions
id: versions
Expand Down
51 changes: 51 additions & 0 deletions .github/workflows/run_nightly_tests_on_release_branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: "Run nightly tests on minor version branch"

"on":
schedule:
# run daily at 00:00 on the old minor version branch
- cron: '0 0 * * *'
- cron: '0 22 * * SAT'

jobs:
run-tests:
runs-on: ubuntu-latest

steps:

- name: Checkout TimescaleDB
uses: actions/checkout@v4

- name: Set env var OLD_MINOR_VERSION_BRANCH
shell: bash

Check failure on line 19 in .github/workflows/run_nightly_tests_on_release_branch.yml

View workflow job for this annotation

GitHub Actions / Check YAML code in tree

19:7 syntax error: expected <block end>, but found '?' (syntax)
run: |
CURRENT_MAIN_VERSION=$(head -1 version.config | cut -d ' ' -f 3 | cut -d '-' -f 1)
CURRENT_MINOR_VERSION=$(echo $CURRENT_MAIN_VERSION | cut -d '.' -f 2)
OLD_MINOR_VERSION=$(echo $CURRENT_MAIN_VERSION | sed -e "s/$CURRENT_MINOR_VERSION/$(($CURRENT_MINOR_VERSION - 1))/g")
echo "OLD_MINOR_VERSION_BRANCH="${OLD_MINOR_VERSION/%.0/.x}"" >> $GITHUB_ENV

- name: Run nightly tests
if: github.event.schedule != '0 22 * * SAT'
env:
GH_TOKEN: ${{ secrets.ORG_AUTOMATION_TOKEN }}
run: |
gh workflow run linux-32bit-build-and-test.yaml -R timescale/timescaledb -f branch="$OLD_MINOR_VERSION_BRANCH"
gh workflow run linux-build-and-test.yaml -R timescale/timescaledb -f branch="$OLD_MINOR_VERSION_BRANCH"
gh workflow run rpm-packages.yaml -R timescale/timescaledb -f branch="$OLD_MINOR_VERSION_BRANCH"
gh workflow run sanitizer-build-and-test.yaml -R timescale/timescaledb -f branch="$OLD_MINOR_VERSION_BRANCH"
gh workflow run windows-build-and-test.yaml -R timescale/timescaledb -f branch="$OLD_MINOR_VERSION_BRANCH"
gh workflow run snapshot-abi.yaml -R timescale/timescaledb -f branch="$OLD_MINOR_VERSION_BRANCH"
gh workflow run abi.yaml -R timescale/timescaledb -f branch="$OLD_MINOR_VERSION_BRANCH"
gh workflow run apt-arm-packages.yaml -R timescale/timescaledb -f branch="$OLD_MINOR_VERSION_BRANCH"
gh workflow run apt-packages.yaml -R timescale/timescaledb -f branch="$OLD_MINOR_VERSION_BRANCH"
gh workflow run docker-images.yaml -R timescale/timescaledb -f branch="$OLD_MINOR_VERSION_BRANCH"
gh workflow run windows-packages.yaml -R timescale/timescaledb -f branch="$OLD_MINOR_VERSION_BRANCH"
gh workflow run homebrew.yaml -R timescale/timescaledb -f branch="$OLD_MINOR_VERSION_BRANCH"
gh workflow run libfuzzer.yaml -R timescale/timescaledb -f branch="$OLD_MINOR_VERSION_BRANCH"
gh workflow run sqlsmith.yaml -R timescale/timescaledb -f branch="$OLD_MINOR_VERSION_BRANCH"

- name: Run weekly coverity tests
if: github.event.schedule != '0 0 * * *'
env:
GH_TOKEN: ${{ secrets.ORG_AUTOMATION_TOKEN }}
run: |
gh workflow run coverity.yaml -R timescale/timescaledb -f branch="$OLD_MINOR_VERSION_BRANCH"
13 changes: 12 additions & 1 deletion .github/workflows/sanitizer-build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ name: Sanitizer test
pull_request:
paths: .github/workflows/sanitizer-build-and-test.yaml
workflow_dispatch:
workflow_call:
inputs:
branch:
description: 'Branch to checkout'
type: string
default: 'main'

env:
name: "Sanitizer"
Expand Down Expand Up @@ -59,14 +65,17 @@ jobs:
steps:
- name: Checkout source code
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch }}

- name: Read configuration
id: setter
run: python .github/gh_config_reader.py

sanitizer:
# Change the JOB_NAME variable below when changing the name.
# Don't use the env variable here because the env context is not accessible.
name: PG${{ matrix.pg }} Sanitizer ${{ matrix.os }}
name: PG${{ matrix.pg }} Sanitizer ${{ matrix.os }} timescaledb${{ github.event.inputs.branch }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
name: PG${{ matrix.pg }} Sanitizer ${{ matrix.os }} timescaledb${{ github.event.inputs.branch }}
name: PG${{ matrix.pg }} Sanitizer ${{ matrix.os }} timescaledb:${{ github.event.inputs.branch }}

runs-on: ${{ matrix.os }}
needs: config
strategy:
Expand All @@ -84,6 +93,8 @@ jobs:

- name: Checkout TimescaleDB
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch }}

# We are going to rebuild Postgres daily, so that it doesn't suddenly break
# ages after the original problem.
Expand Down
Loading
Loading