Continuous Integration #980
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: Continuous Integration | |
on: | |
push: | |
paths-ignore: | |
- 'docs/**' | |
- '**/*.md' | |
- '**/*.rst' | |
branches: | |
- main | |
- '[0-9].*' | |
pull_request: | |
branches: | |
- main | |
- '[0-9].*' | |
schedule: | |
- cron: '0 1 * * *' # nightly build | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build and Test | |
runs-on: ubuntu-24.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
redis_version: | |
- "8.0" | |
- "7.4" | |
- "7.2" | |
env: | |
REDIS_ENV_WORK_DIR: ${{ github.workspace }}/work | |
steps: | |
- name: Checkout project | |
uses: actions/checkout@v4 | |
- name: Set Java up in the runner | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '8' | |
distribution: 'temurin' | |
cache: 'maven' | |
- name: Setup Maven | |
uses: s4u/[email protected] | |
with: | |
java-version: 8 | |
- name: Install missing dependencies to container | |
run: | | |
sudo apt update | |
- name: Set up Docker Compose environment | |
run: | | |
mkdir -m 777 $REDIS_ENV_WORK_DIR | |
make start version=${{ matrix.redis_version }} | |
- name: Maven offline | |
run: | | |
mvn -q dependency:go-offline | |
continue-on-error: true | |
- name: Run tests | |
run: | | |
export TEST_WORK_FOLDER=$REDIS_ENV_WORK_DIR | |
echo $TEST_WORK_FOLDER | |
ls -la $TEST_WORK_FOLDER | |
make test-coverage | |
env: | |
JVM_OPTS: -Xmx3200m | |
TERM: dumb | |
- name: Tear down Docker Compose environment | |
run: | | |
docker compose $COMPOSE_ENV_FILES -f src/test/resources/docker-env/docker-compose.yml down | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
- name: Upload test failure reports to Codecov | |
uses: codecov/test-results-action@v1 | |
if: always() # always upload test results to include test failures | |
with: | |
fail_ci_if_error: false | |
files: ./target/surefire-reports/TEST*,./target/failsafe-reports/TEST* | |
verbose: ${{ runner.debug }} | |
token: ${{ secrets.CODECOV_TOKEN }} |