add doc #687
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
# 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: Run Tests on Docker | |
on: | |
push: | |
branches: [ "main", "renovate/**" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
docker-java-test: | |
runs-on: ubuntu-latest | |
env: | |
DOCKER_USER: ${{ secrets.DOCKER_USER }} | |
DOCKER_PASS: ${{ secrets.DOCKER_PASS }} | |
steps: | |
- name: free disk space | |
run: | | |
sudo swapoff -a | |
sudo rm -f /swapfile | |
sudo apt clean | |
# docker rmi $(docker image ls -aq) # this step is failing | |
df -h | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '21' | |
distribution: 'temurin' | |
cache: maven | |
- name: Grant execute permission for mvnw | |
run: chmod +x mvnw | |
# In this step, this action saves a list of existing images, | |
# the cache is created without them in the post run. | |
# It also restores the cache if it exists. | |
- uses: jpribyl/[email protected] | |
# Ignore the failure of a step and avoid terminating the job. | |
continue-on-error: true | |
- name: Login to DockerHub | |
run: docker login -u $DOCKER_USER -p $DOCKER_PASS | |
- name: Build docker image | |
run: docker compose -f 'docker/docker-compose.base.yml' -f 'docker/docker-compose.test-all.yml' build | |
- name: Run tests in docker container | |
run: docker compose -f 'docker/docker-compose.base.yml' -f 'docker/docker-compose.test-all.yml' up --exit-code-from base | |
# - name: Setup Java JDK | |
# uses: actions/setup-java@v3 | |
# with: | |
# # The Java version to make available on the path. Takes a whole or semver Java version, or 1.x syntax (e.g. 1.8 => Java 8.x). Early access versions can be specified in the form of e.g. 14-ea, 14.0.0-ea, or 14.0.0-ea.28 | |
# distribution: 'temurin' # See 'Supported distributions' for available options | |
# java-version: '17' | |
# - name: Run mvn verify | |
# run: ./mvnw clean verify # -pl vvd-common,vvd-commonkt,vvd-taskproducer,vvd-downloader |