Bump version for GitHub actions #100
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 ] | |
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@v4 | |
with: | |
distribution: 'zulu' | |
java-version: '8' | |
cache: 'maven' | |
- 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: Upload jacoco exec results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: tests-cartridge-container-jacoco | |
path: "**/jacoco-cartridge-container.exec" | |
retention-days: 5 | |
overwrite: true | |
tests-ee: | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 1.8 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: '8' | |
cache: 'maven' | |
- name: Run enterprise tests | |
env: | |
TARANTOOL_SERVER_USER: root | |
TARANTOOL_SERVER_GROUP: root | |
DOWNLOAD_HOST: https://tarantool:${{ secrets.DOWNLOAD_SDK_TOKEN }}@download.tarantool.io | |
SDK_PATH: enterprise/release/linux/x86_64/2.11/tarantool-enterprise-sdk-nogc64-2.11.2-0-r609.linux.x86_64.tar.gz | |
run: ./mvnw -B test -P enterprise -Djacoco.destFile=target/jacoco-ee.exec --file pom.xml | |
- name: Upload jacoco exec results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: tests-ee-jacoco | |
path: "**/jacoco-ee.exec" | |
retention-days: 5 | |
overwrite: true | |
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@v4 | |
with: | |
distribution: 'zulu' | |
java-version: '8' | |
cache: 'maven' | |
- 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: Upload jacoco exec results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: tests-tarantool-container-jacoco | |
path: "**/jacoco-tarantool-container.exec" | |
retention-days: 5 | |
overwrite: true | |
merge-jacoco-report: | |
name: Jacoco Merge Results | |
needs: | |
- tests-cartridge-container | |
- tests-ee | |
- tests-tarantool-container | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 1.8 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: '8' | |
cache: 'maven' | |
- uses: actions/download-artifact@v4 | |
with: | |
name: tests-cartridge-container-jacoco | |
path: . | |
- uses: actions/download-artifact@v4 | |
with: | |
name: tests-ee-jacoco | |
path: . | |
- uses: actions/download-artifact@v4 | |
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@v4 | |
with: | |
name: coverage-results-report | |
path: target/site/jacoco | |
if-no-files-found: error | |
overwrite: true | |
- 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 |