-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (54 loc) · 2.02 KB
/
upgrade-tests.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
name: Upgrade Tests
on:
pull_request:
paths:
- 'kong/db/migrations/**'
- 'spec/05-migration/**'
push:
paths-ignore:
# ignore top-level markdown files (CHANGELOG.md, README.md, etc.)
- '*.md'
branches:
- master
- release/*
- test-please/*
# cancel previous runs if new commits are pushed to the PR, but run for each commit on master
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
upgrade-test:
name: Run migration tests
runs-on: ubuntu-22.04
steps:
- name: Install Docker
run: |
sudo apt-get -y update
sudo apt-get -y install ca-certificates curl gnupg lsb-release
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin
- name: Install prerequisites
run: |
sudo apt-get -y install jq
- name: Install gojira
run: |
cd $RUNNER_WORKSPACE
git clone https://github.com/Kong/gojira
mkdir -p $HOME/.local/bin
ln -s $(pwd)/gojira/gojira.sh $HOME/.local/bin/gojira
- name: Clone Kong source code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Run upgrade tests (Postgres)
run: |
export GOJIRA_KONG_REPO_URL=$GITHUB_WORKSPACE
bash -x ./scripts/test-upgrade-path.sh -d postgres 2.8.0 $GITHUB_SHA
- name: Run upgrade tests (Cassandra)
run: |
export GOJIRA_KONG_REPO_URL=$GITHUB_WORKSPACE
gojira nuke
bash -x ./scripts/test-upgrade-path.sh -d cassandra 2.8.0 $GITHUB_SHA