-
Notifications
You must be signed in to change notification settings - Fork 5
94 lines (94 loc) · 2.85 KB
/
Copy pathtest.yml
File metadata and controls
94 lines (94 loc) · 2.85 KB
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
90
91
92
93
94
name: Test
on:
push:
branches:
- "development"
paths:
- "kedis/**"
- "kedis-lock/**"
- "gradle.properties"
- "gradle/wrapper/**"
- "gradle/libs.versions.toml"
- ".github/workflows/test.yml"
pull_request:
paths:
- "kedis/**"
- "kedis-lock/**"
- "gradle.properties"
- "gradle/wrapper/**"
- "gradle/libs.versions.toml"
- ".github/workflows/test.yml"
jobs:
test:
runs-on: ubuntu-latest
services:
redis6:
# oldest redis-stack: redis/redis-stack:6.2.0-v1
# latest redis-stack 6: redis/redis-stack:6.2.6-v9
# latest redis 6: redis:6-alpine
image: redis/redis-stack:6.2.0-v1
ports:
- 6380:6379
redis7:
# latest redis-stack 7: redis/redis-stack:7.4.0-v5
# latest redis 7: redis:7-alpine
image: redis/redis-stack:7.4.0-v5
ports:
- 6381:6379
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Setup Java
uses: actions/setup-java@v6
with:
distribution: 'corretto'
java-version: '17'
- name: Setup Gradle
uses: gradle/gradle-build-action@v3.5.0
# https://github.com/actions/cache/blob/main/examples.md#java---gradle
- uses: actions/cache@v6
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Test with Redis 6 on ${{ matrix.os }}
run: |
export IS_CI=yes
export REDIS_PORT=6380
./gradlew cleanTest
./gradlew clean
./gradlew kedis:smartTest
./gradlew kedis-lock:smartTest
- name: Test reports for Redis 6 on ${{ matrix.os }}
uses: actions/upload-artifact@v7
if: failure()
with:
name: test-${{ github.sha }}-${{ matrix.os }}-redis-6
path: |
kedis/build/test-results/
kedis/build/reports/tests/
kedis-lock/build/test-results/
kedis-lock/build/reports/tests/
overwrite: true
- name: Test with Redis 7 on ${{ matrix.os }}
run: |
export IS_CI=yes
export REDIS_PORT=6381
./gradlew cleanTest
./gradlew clean
./gradlew kedis:smartTest
./gradlew kedis-lock:smartTest
- name: Test reports for Redis 7 on ${{ matrix.os }}
uses: actions/upload-artifact@v7
if: failure()
with:
name: test-${{ github.sha }}-${{ matrix.os }}-redis-7
path: |
kedis/build/test-results/
kedis/build/reports/tests/
kedis-lock/build/test-results/
kedis-lock/build/reports/tests/
overwrite: true