Skip to content

Fix test attempt #2 #1809

Fix test attempt #2

Fix test attempt #2 #1809

Workflow file for this run

name: Build
on: [ push, pull_request ]
jobs:
test:
runs-on: ubuntu-latest
container: eclipse-temurin:17-jdk
steps:
- name: Get the version
id: get_version
run: |
if echo $GITHUB_REF | grep -Eq '^refs\/tags\/.*'; then
echo ::set-output name=API_VERSION::${GITHUB_REF#refs/tags/}
else
echo ::set-output name=API_VERSION::${GITHUB_SHA}
fi
- name: Install tools
run: apt update && apt install -y git wget
- name: Checkout code
uses: actions/checkout@v2
- name: Gradle build
env:
API_VERSION: ${{ steps.get_version.outputs.API_VERSION }}
GRADLE_CLI_OPTS: ""
run: "chmod +x ./gradlew && ./gradlew ${GRADLE_CLI_OPTS} -Pversion=${API_VERSION} build jacocoTestReport"
- name: Build and push Docker images
if: github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/tags')
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: faforever/faf-java-api
tag_with_ref: true
- name: Codecov
uses: codecov/codecov-action@v1
with:
file: ./build/reports/jacoco/test/jacocoTestReport.xml
name: codecov