Skip to content

Commit

Permalink
Add other cronjobs to run
Browse files Browse the repository at this point in the history
On minor version branch.
Set minor version branch in matrix for coverity run.
  • Loading branch information
pallavisontakke committed Feb 5, 2025
1 parent 37fdc22 commit 33ec3e0
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 10 deletions.
43 changes: 36 additions & 7 deletions .github/workflows/coverity.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,42 @@ name: Coverity
branches:
- coverity_scan
workflow_dispatch:
workflow_call:
inputs:
branch:
description: 'Branch to checkout'
type: string
default: 'main'

jobs:

set-old-minor-version-branch:
runs-on: ubuntu-latest

steps:

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

- 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

coverity:
name: Coverity ${{ matrix.pg }}
runs-on: ${{ matrix.os }}
Expand All @@ -24,6 +52,7 @@ jobs:
# run only on the 3 latest PG versions as we have rate limit on coverity
pg: [15, 16, 17]
os: [ubuntu-20.04]
timescaledb_branch: [main, ${{ env.OLD_MINOR_VERSION_BRANCH }}]

Check failure on line 55 in .github/workflows/coverity.yaml

View workflow job for this annotation

GitHub Actions / Check YAML code in tree

55:37 syntax error: expected ',' or ']', but got '{' (syntax)
steps:
- name: Install Dependencies
run: |
Expand All @@ -36,7 +65,7 @@ jobs:
- name: Checkout TimescaleDB
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch }}
ref: ${{ matrix.timescaledb_branch }}

- name: Coverity tools
run: |
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/homebrew.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ jobs:
# checkout code to get version information
- uses: actions/checkout@v4
with:

Check failure on line 51 in .github/workflows/homebrew.yaml

View workflow job for this annotation

GitHub Actions / Check YAML code in tree

51:12 syntax error: mapping values are not allowed here (syntax)
ref: ${{ github.event.inputs.branch }}

- name: Test Installation
run: |
Expand Down
17 changes: 14 additions & 3 deletions .github/workflows/run_nightly_tests_on_release_branch.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
name: "Run nightly tests on release branch"
name: "Run nightly tests on minor version branch"

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

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

steps:

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

- 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
Expand Down Expand Up @@ -46,3 +50,10 @@ jobs:
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"

0 comments on commit 33ec3e0

Please sign in to comment.