Add support for environment variable TARANTOOL_REGISTRY #98
Workflow file for this run
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
# This workflow will build a Java project with Maven | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven | |
name: Tests | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
env: | |
TARANTOOL_REGISTRY: "registry.ps.tarantool.io/" | |
TESTCONTAINERS_HUB_IMAGE_NAME_PREFIX: "registry.ps.tarantool.io/" | |
jobs: | |
tests-cartridge-container: | |
runs-on: ubuntu-latest | |
timeout-minutes: 25 | |
strategy: | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 1.8 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: '8' | |
cache: 'maven' | |
- name: Docker login to private registry | |
run: docker login "$TARANTOOL_REGISTRY" -u admin -p "${{ secrets.TARANTOOL_REGISTRY_PASSWORD }}" | |
- name: Build and run unit tests | |
run: ./mvnw -B verify -Djacoco.destFile=target/jacoco-cartridge-container.exec --file pom.xml | |
- name: Run integration tests | |
env: | |
TARANTOOL_SERVER_USER: root | |
TARANTOOL_SERVER_GROUP: root | |
TARANTOOL_VERSION: "2.11.2-ubuntu20.04" | |
run: ./mvnw -B test -P integration -Djacoco.destFile=target/jacoco-cartridge-container.exec --file pom.xml | |
- name: Print system images | |
run: docker images | |
- name: Upload jacoco exec results | |
uses: actions/upload-artifact@v2 | |
with: | |
name: tests-cartridge-container-jacoco | |
path: "**/jacoco-cartridge-container.exec" | |
tests-tarantool-container: | |
runs-on: ubuntu-latest | |
timeout-minutes: 25 | |
strategy: | |
matrix: | |
tarantool-version: [ "1.x-centos7", "2.11.2-ubuntu20.04", "3.0.1-old" ] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 1.8 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: '8' | |
cache: 'maven' | |
- name: Docker login to private registry | |
run: docker login "$TARANTOOL_REGISTRY" -u admin -p "${{ secrets.TARANTOOL_REGISTRY_PASSWORD }}" | |
- name: Build and run integration matrix tests | |
env: | |
TARANTOOL_VERSION: ${{ matrix.tarantool-version }} | |
TARANTOOL_SERVER_USER: root | |
TARANTOOL_SERVER_GROUP: root | |
run: ./mvnw -B test -P tarantool-container -Djacoco.destFile=target/jacoco-tarantool-container.exec --file pom.xml | |
- name: Print system images | |
run: docker images | |
- name: Upload jacoco exec results | |
uses: actions/upload-artifact@v2 | |
with: | |
name: tests-tarantool-container-jacoco | |
path: "**/jacoco-tarantool-container.exec" | |
merge-jacoco-report: | |
name: Jacoco Merge Results | |
needs: | |
- tests-cartridge-container | |
- tests-tarantool-container | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 1.8 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: '8' | |
cache: 'maven' | |
- uses: actions/download-artifact@v2 | |
with: | |
name: tests-cartridge-container-jacoco | |
path: . | |
- uses: actions/download-artifact@v2 | |
with: | |
name: tests-tarantool-container-jacoco | |
path: . | |
- name: merge results | |
run: | | |
./mvnw package jacoco:merge jacoco:report -DskipTests -Darguments=-DskipTests | |
- name: Upload jacoco coverage despite the check result | |
if: ${{ always() }} | |
uses: actions/upload-artifact@v2 | |
with: | |
name: coverage-results-report | |
path: target/site/jacoco | |
if-no-files-found: error | |
- name: Jacoco Report to PR | |
id: jacoco | |
uses: madrapps/[email protected] | |
with: | |
paths: target/site/jacoco/jacoco.xml | |
token: ${{ secrets.GITHUB_TOKEN }} | |
min-coverage-overall: 40 | |
min-coverage-changed-files: 60 | |
update-comment: true |