Add possibility to configure split-brain protection #1940
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: Java CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: zulu | |
java-version: 11 | |
- name: Run tests and install | |
run: ./gradlew check installDist | |
- name: Create test reports | |
run: ./gradlew jacocoTestReport | |
- name: Upload code coverage report | |
run: bash <(curl -s https://codecov.io/bash) -s build/reports/jacoco | |
- name: Upload install directory as artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: steep-install | |
path: build/install | |
retention-days: 1 | |
ui-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: zulu | |
java-version: 11 | |
- name: Run UI tests | |
run: ./gradlew :ui:ci | |
docker-image: | |
needs: [build, ui-tests] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Download install directory | |
uses: actions/download-artifact@v3 | |
with: | |
name: steep-install | |
path: build/install | |
# permissions are lost during artifact upload/download | |
- name: Make steep launcher executable again | |
run: chmod +x build/install/steep/bin/steep | |
- name: Build Docker image | |
run: | | |
docker build -t steep/steep . | |
docker tag steep/steep steep/steep:unstable | |
- name: Push Docker image | |
if: github.repository == 'steep-wms/steep' && github.event_name == 'push' | |
env: | |
DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }} | |
DOCKER_HUB_ACCESS_TOKEN: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | |
run: | | |
echo $DOCKER_HUB_ACCESS_TOKEN | docker login --username $DOCKER_HUB_USERNAME --password-stdin | |
docker push steep/steep:unstable |