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

Prerelease Tests on Release branch - backport #7759

Open
wants to merge 4 commits into
base: 2.18.x
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 77 additions & 0 deletions .github/workflows/prerelease-tests-on-release-branch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Prerelease Tests

name: Prerelease Tests on Release branch
on:
workflow_dispatch:
schedule:
# run prerelease tests daily at 5 am UTC
- cron: '0 5 * * *'
# run coverity tests at 22:00 on every sunday
- cron: '0 22 * * SUN'

# The workflow needs the permission to push branches
permissions:
contents: write

jobs:
prerelease_test:
name: Prerelease test
runs-on: ubuntu-latest

steps:

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

- name: Set RELEASE_BRANCH as per environment
run: |
OLD_MINOR_VERSION=$(tail -1 version.config | cut -d ' ' -f 3 | cut -d '-' -f 1)
echo "RELEASE_BRANCH="$(echo ${OLD_MINOR_VERSION%?}x)"" >> $GITHUB_ENV

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

# Prerelease Testing
#
# Push the release branch to upstream/prerelease_test branch in the TimescaleDB repository.
#
# Commits on this branch will be tested by more tests than our usual PRs.
# You can see the pre-release test progress under the actions
# (https://github.com/timescale/timescaledb/actions?query=branch%3Aprerelease_test)
# or under the pull request you created for the release.
#
# Note: Because the upgrade script does not get executed at this stage, some test might fail.
# These test failures can be ignored at this point. Your branch will be re-tested as soon as
# the proper downgrade script is created and the versioning is adjusted.

- name: Push the release branch to prerelease_test branch
if: github.event.schedule == '0 5 * * *'
env:
GITHUB_TOKEN: ${{ secrets.ORG_AUTOMATION_TOKEN }}
run: |
git push origin HEAD:prerelease_test --force


# Coverity Testing
#
# Coverity (https://scan.coverity.com) is a static code analysis software that analyzes sourcecode
# and spots problems like null pointer dereferences or incorrect expressions. To execute Coverity on
# your release, the release needs to be pushed to the branch coverity_scan. After pushing the release
# to the branch, a GitHub action (https://github.com/timescale/timescaledb/blob/main/.github/workflows/coverity.yaml)
# is triggered that starts the code analysis.

# You can see the result of the Coverity scan under the URL (https://scan.coverity.com/projects/timescale-timescaledb?tab=overview).
# A few minutes after you have pushed your changes to the coverity_scan branch, you should see that the
# check of commit has been started. When the check is done, there should be no new errors reported (0 Newly detected).
#
# Note: Some rate limits (https://scan.coverity.com/faq#frequency) apply to the Coverity service. So,
# don't push your branch too often to this service.

- name: Push the release branch to coverity_scan branch
if: github.event.schedule == '0 22 * * SUN'
env:
GITHUB_TOKEN: ${{ secrets.ORG_AUTOMATION_TOKEN }}
run: |
git push origin HEAD:coverity_scan --force
Loading