-
Notifications
You must be signed in to change notification settings - Fork 17
66 lines (62 loc) · 2.35 KB
/
integration-test.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
name: APIM CLI Integration Tests
on: [push]
env:
CASSANDRA_DOCKER_IMAGE: cassandra:4.1.6
APIM_DOCKER_IMAGE: docker.repository.axway.com/apigateway-docker-prod/7.7/gateway:7.7.0.20240830-4-BN0145-ubi9
CACHE_FILE_APIM: api-manager_7_7_20240830.cache.tar
CACHE_FILE_CASSANDRA: cassandra_4_1_6.cache.tar
FED_FILE: swagger-promote-7.7-20240830.fed
LOG_LEVEL: debug
jobs:
integration-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Maven Build and Unit Test
run: mvn clean test
- name: Cache docker images
id: cache-docker
uses: actions/cache@v3
with:
path: ~/cache-docker
key: docker-image-cache-${{ runner.os }}
- if: steps.cache-docker.outputs.cache-hit != 'true'
name: Login to Axway docker registry
uses: docker/login-action@v2
with:
registry: docker.repository.axway.com
username: ${{ secrets.AXWAY_DOCKER_REG_USER }}
password: ${{ secrets.AXWAY_DOCKER_REG_PASS }}
- if: steps.cache-docker.outputs.cache-hit != 'true'
name: Pull and Save docker images
run: |
mkdir -p ~/cache-docker
docker pull $APIM_DOCKER_IMAGE
docker save -o ~/cache-docker/$CACHE_FILE_APIM $APIM_DOCKER_IMAGE
docker pull $CASSANDRA_DOCKER_IMAGE
docker save -o ~/cache-docker/$CACHE_FILE_CASSANDRA $CASSANDRA_DOCKER_IMAGE
- if: steps.cache-docker.outputs.cache-hit == 'true'
name: Load docker image from cache
run: |
docker load -i ~/cache-docker/$CACHE_FILE_APIM
docker load -i ~/cache-docker/$CACHE_FILE_CASSANDRA
- name: Run docker images
run: |
mkdir licenses
echo ${{ secrets.APIM_LIC }} | base64 -di > licenses/apim.lic
docker compose run --rm start_cassandra
docker compose run --rm start_apimgmt
docker compose logs --tail 30 apimgmt
- name: Maven APIM Integration Test
run: mvn verify -P integration-tests