-
Notifications
You must be signed in to change notification settings - Fork 68
89 lines (72 loc) · 2.18 KB
/
integration-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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: CCM Integration tests
on:
push:
branches:
- master
- next*
pull_request:
branches:
- next*
env:
RELOC_VERSION: "2023-04-13T13:31:00Z"
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-test.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Setup java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '8'
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install python2
pip install -U pip setuptools
pip install .
if [ -f requirements-test.txt ]; then pip install -r requirements-test.txt; fi
- name: Cache binary versions
id: cache-versions
uses: actions/cache@v2
with:
path: |
~/.ccm/repository
~/.ccm/scylla-repository
key: ${{ runner.os }}-${{ env.RELOC_VERSION }}-binaries
- name: Set environmental variables
run: |
echo "SCYLLA_VERSION=unstable/master:$RELOC_VERSION" >> "$GITHUB_ENV"
- name: Download versions
if: steps.cache-versions.outputs.cache-hit != 'true'
run: |
normalized=$(echo $RELOC_VERSION | tr ':' '_')
if [ ! -f ~/.ccm/scylla-repository/unstable/master/$normalized ]; then
./ccm create temp -n 1 --scylla --version unstable/master:${RELOC_VERSION}
./ccm remove
fi
./ccm create temp-cas -n 1 --version 3.11.4 > /dev/null
./ccm remove
- name: Test with pytest
run: |
python -m pytest ./tests -x
- name: Copy logs/results
if: contains(github.event.pull_request.labels.*.name, 'PR-upload-log')
uses: actions/upload-artifact@v2
with:
name: ccm-tests-log
path: tests/test_results/