|
| 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