This repository has been archived by the owner on Apr 2, 2024. It is now read-only.
Update github actions #3204
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Integration | |
defaults: | |
run: | |
shell: bash --noprofile --norc -eo pipefail {0} | |
on: | |
push: | |
branches: [master, main, force_test, release-*, staging, trying] | |
pull_request: | |
branches: [master, main, force_test, release-*] | |
env: | |
golang-version: 1.22.1 | |
jobs: | |
run: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
pg: | |
- 15 | |
- 14 | |
- 13 | |
# TODO (mat): re-enable the pg12 test | |
#- 12 | |
steps: | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v3 | |
- name: Set up Go ${{ env.golang-version }} | |
uses: actions/setup-go@v3.5.0 | |
with: | |
go-version: ${{ env.golang-version }} | |
id: go | |
- name: Prepare metadata | |
id: metadata | |
run: | | |
branch_name=$(echo ${{github.head_ref || github.ref_name}} | sed 's#/#-#') | |
possible_branch_tag=$(echo ${branch_name}-ts2-pg${{matrix.pg}}) | |
extension_version=$(cat EXTENSION_VERSION | tr -d '[:space:]') | |
stable_branch_tag=$(echo ${extension_version}-ts2-pg${{matrix.pg}}) | |
image_base="ghcr.io/timescale/dev_promscale_extension" | |
docker_image=$(./scripts/fallback-docker.sh ${image_base}:${possible_branch_tag} ${image_base}:${stable_branch_tag}) | |
echo "docker_image=${docker_image}" >> ${GITHUB_OUTPUT} | |
- name: TimescaleDB 2.x with Promscale extension (pg${{matrix.pg}}) | |
run: ./scripts/end_to_end_tests.sh ${{steps.metadata.outputs.docker_image}} | |
shell: bash | |
# Added to summarize the matrix (otherwise we would need to list every single job in branch protection rules) | |
run-result: | |
name: integration results | |
if: always() | |
needs: | |
- run | |
runs-on: ubuntu-latest | |
steps: | |
- name: Mark the job as a success | |
if: needs.run.result == 'success' | |
run: exit 0 | |
- name: Mark the job as a failure | |
if: needs.run.result != 'success' | |
run: exit 1 |