Skip to content

Commit 4785bb5

Browse files
authored
Add a scheduled test for 7.x IPUs (#9009)
1 parent a5c86e6 commit 4785bb5

File tree

5 files changed

+793
-5
lines changed

5 files changed

+793
-5
lines changed

.github/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ all: \
1515
workflows/tests.pg-versions.yml \
1616
workflows/tests.patches.yml \
1717
workflows/tests.inplace.yml \
18+
workflows/tests.inplace7x.yml \
1819
workflows/tests.reflection.yml \
1920

2021
workflows/build.%.yml: workflows.src/build.%.tpl.yml workflows.src/build.%.targets.yml workflows.src/build.inc.yml

.github/workflows.src/tests.inc.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
1-
<% macro init() -%>
1+
<% macro init(ref='') -%>
22
- uses: actions/checkout@v4
33
with:
44
fetch-depth: 0
55
submodules: false
6+
<%- if ref != "" %>
7+
ref: << ref >>
8+
<%- endif %>
69

710
- uses: actions/checkout@v4
811
with:
912
fetch-depth: 50
1013
submodules: true
14+
<%- if ref != "" %>
15+
ref: << ref >>
16+
<%- endif %>
1117

1218
- name: Set up Python
1319
uses: actions/setup-python@v5
@@ -34,8 +40,8 @@
3440

3541
<%- endmacro %>
3642

37-
<% macro build() %>
38-
<< init() >>
43+
<% macro build(ref="") %>
44+
<< init(ref) >>
3945

4046
- name: Cached requirements.txt
4147
uses: actions/cache@v4
@@ -308,8 +314,8 @@
308314
309315
<%- endmacro %>
310316

311-
<% macro restore_cache() %>
312-
<< init() >>
317+
<% macro restore_cache(ref="") %>
318+
<< init(ref) >>
313319
<< install_python_requirements() >>
314320

315321
# Restore the artifacts and environment variables
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
data:
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
<% from "tests.inc.yml" import build, calc_cache_key, restore_cache -%>
2+
3+
name: Tests of in-place upgrades to 7.x
4+
5+
on:
6+
schedule:
7+
- cron: "0 3 * * *"
8+
workflow_dispatch:
9+
inputs: {}
10+
push:
11+
branches:
12+
- "A-inplace*"
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
<%- call build("release/7.x") -%>
20+
- name: Compute cache keys
21+
run: |
22+
<< calc_cache_key()|indent >>
23+
<%- endcall %>
24+
25+
test-inplace:
26+
runs-on: ubuntu-latest
27+
needs: build
28+
strategy:
29+
fail-fast: false
30+
matrix:
31+
include:
32+
- flags:
33+
tests:
34+
- flags: --rollback-and-test
35+
tests:
36+
# Do the reapply test on a smaller selection of tests, since
37+
# it is slower.
38+
- flags: --rollback-and-reapply
39+
tests: -k test_link_on_target_delete -k test_edgeql_select -k test_dump
40+
41+
steps:
42+
<<- restore_cache("release/7.x") >>
43+
44+
# Run the test
45+
# TODO: Would it be better to split this up into multiple jobs?
46+
- name: Test performing in-place upgrades
47+
run: |
48+
./tests/inplace-testing/test.sh ${{ matrix.flags }} vt ${{ matrix.tests }}
49+
50+
compute-versions:
51+
runs-on: ubuntu-latest
52+
outputs:
53+
matrix: ${{ steps.set-matrix.outputs.matrix }}
54+
steps:
55+
- uses: actions/checkout@v4
56+
with:
57+
fetch-depth: 0
58+
submodules: false
59+
ref: release/7.x
60+
- id: set-matrix
61+
name: Compute versions to run on
62+
run: python3 .github/scripts/patches/compute-ipu-versions.py
63+
64+
65+
test:
66+
runs-on: ubuntu-latest
67+
needs: [build, compute-versions]
68+
strategy:
69+
fail-fast: false
70+
matrix: ${{fromJSON(needs.compute-versions.outputs.matrix)}}
71+
72+
steps:
73+
<<- restore_cache("release/7.x") >>
74+
75+
# Run the test
76+
77+
- name: Download an earlier database version
78+
run: |
79+
wget -q "${{ matrix.edgedb-url }}"
80+
tar xzf ${{ matrix.edgedb-basename }}-${{ matrix.edgedb-version }}.tar.gz
81+
82+
- name: Make sure a CLI named "edgedb" exists (sigh)
83+
run: |
84+
ln -s gel $(dirname $(which gel))/edgedb
85+
86+
- name: Test inplace upgrades from previous major version
87+
run: |
88+
./tests/inplace-testing/test-old.sh vt ${{ matrix.edgedb-basename }}-${{ matrix.edgedb-version }}
89+
90+
91+
workflow-notifications:
92+
if: failure() && github.event_name != 'pull_request'
93+
name: Notify in Slack on failures
94+
needs:
95+
- build
96+
- test-inplace
97+
runs-on: ubuntu-latest
98+
permissions:
99+
actions: 'read'
100+
steps:
101+
- name: Slack Workflow Notification
102+
uses: Gamesight/slack-workflow-status@26a36836c887f260477432e4314ec3490a84f309
103+
with:
104+
repo_token: ${{secrets.GITHUB_TOKEN}}
105+
slack_webhook_url: ${{secrets.ACTIONS_SLACK_WEBHOOK_URL}}
106+
name: 'Workflow notifications'
107+
icon_emoji: ':hammer:'
108+
include_jobs: 'on-failure'

0 commit comments

Comments
 (0)