Format api config file #803
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |