(cherry picked from commit 80d489384f1f5eac64a86264b9441e0b725f18ea) #2551
This file contains hidden or 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: Redis Cache Tests | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| branches: | |
| - 'master' | |
| - 'release-*' | |
| push: | |
| branches: | |
| - 'master' | |
| - 'beta' | |
| - 'release-*' | |
| jobs: | |
| test-redis: | |
| name: Test Redis Cache | |
| env: | |
| GIT_REF: ${{ github.ref }} | |
| GIT_SHA: ${{ github.sha }} | |
| POM_PATH: ./pom.xml | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| redis-version: [ 6 ] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v2 | |
| with: | |
| fetch-depth: 1 | |
| - name: Setup Java JDK | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: ${{ vars.JAVA_VERSION }} | |
| distribution: 'temurin' | |
| - name: Setup Maven | |
| uses: stCarolas/setup-maven@v4.5 | |
| with: | |
| maven-version: ${{ vars.MAVEN_VERSION }} | |
| - name: Setup Maven settings | |
| uses: whelk-io/maven-settings-xml-action@v14 | |
| with: | |
| repositories: '[{ "id": "github-genexuslabs", "url": "https://maven.pkg.github.com/genexuslabs/Private-Maven-for-GX", "releases": { "enabled": "true" }, "snapshots": { "enabled": "true" } }]' | |
| servers: '[{ "id": "github-genexuslabs", "username": "genexusbot", "password": "${{ secrets.SECURE_TOKEN }}" }]' | |
| - name: Install | |
| run: mvn -B install --file $POM_PATH -DskipTests | |
| - name: Start Redis | |
| uses: supercharge/redis-github-action@1.4.0 | |
| with: | |
| redis-version: ${{ matrix.redis-version }} | |
| - name: Test | |
| env: | |
| EXECUTE_REDIS_TESTS: true | |
| run: mvn -B -pl gxcache-redis test --file $POM_PATH | |