This repository has been archived by the owner on Apr 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 169
65 lines (57 loc) · 1.9 KB
/
integration.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
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