Skip to content

Commit

Permalink
Determine MINOR_VERSION_BRANCH programmatically
Browse files Browse the repository at this point in the history
  • Loading branch information
pallavisontakke committed Feb 5, 2025
1 parent c948e75 commit 37fdc22
Showing 1 changed file with 36 additions and 12 deletions.
48 changes: 36 additions & 12 deletions .github/workflows/run_nightly_tests_on_release_branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,39 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Run nightly tests
env:
GH_TOKEN: ${{ secrets.ORG_AUTOMATION_TOKEN }}
RELEASE_BRANCH: '2.18.x'
run: |
gh workflow run linux-32bit-build-and-test.yaml -R timescale/timescaledb -f branch="$RELEASE_BRANCH"
gh workflow run linux-build-and-test.yaml -R timescale/timescaledb -f branch="$RELEASE_BRANCH"
gh workflow run rpm-packages.yaml -R timescale/timescaledb -f branch="$RELEASE_BRANCH"
gh workflow run sanitizer-build-and-test.yaml -R timescale/timescaledb -f branch="$RELEASE_BRANCH"
gh workflow run windows-build-and-test.yaml -R timescale/timescaledb -f branch="$RELEASE_BRANCH"
gh workflow run snapshot-abi.yaml -R timescale/timescaledb -f branch="$RELEASE_BRANCH"
gh workflow run abi.yaml -R timescale/timescaledb -f branch="$RELEASE_BRANCH"
- name: Set env var CURRENT_MAIN_VERSION
run: echo "CURRENT_MAIN_VERSION=$(head -1 version.config | cut -d ' ' -f 3 | cut -d '-' -f 1)" >> $GITHUB_ENV
- name: Test env var CURRENT_MAIN_VERSION
run: echo $CURRENT_MAIN_VERSION

- name: Set env var CURRENT_MINOR_VERSION
run: echo "CURRENT_MINOR_VERSION=$(echo ${{ env.CURRENT_MAIN_VERSION }} | cut -d '.' -f 2)" >> $GITHUB_ENV
- name: Test env var CURRENT_MINOR_VERSION
run: echo $CURRENT_MINOR_VERSION

- name: Set env var OLD_MINOR_VERSION
run: echo "OLD_MINOR_VERSION=$((${{ env.CURRENT_MINOR_VERSION }} - 1))" >> $GITHUB_ENV
- name: Test env var OLD_MINOR_VERSION
run: echo $OLD_MINOR_VERSION

- name: Set env var OLD_MINOR_VERSION_FULL
run: echo "OLD_MINOR_VERSION_FULL=$(echo ${{ env.CURRENT_MAIN_VERSION }} | sed -e "s/${{ env.CURRENT_MINOR_VERSION }}/${{ env.OLD_MINOR_VERSION }}/g")" >> $GITHUB_ENV
- name: Test env var OLD_MINOR_VERSION_FULL
run: echo $OLD_MINOR_VERSION_FULL

- name: Set env var OLD_MINOR_VERSION_BRANCH
run: echo "OLD_MINOR_VERSION_BRANCH="${${{ env.OLD_MINOR_VERSION_FULL }}/%.0/.x}"" >> $GITHUB_ENV
- name: Test env var OLD_MINOR_VERSION_BRANCH
run: echo $OLD_MINOR_VERSION_BRANCH

- name: Run nightly tests
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"

0 comments on commit 37fdc22

Please sign in to comment.