Skip to content

More GitHub actions upgrade #68

More GitHub actions upgrade

More GitHub actions upgrade #68

name: Continuous Integration
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: Build with Gradle
working-directory: ./generator
run: ./gradlew build
- name: Upload received files from failing tests
uses: actions/upload-artifact@v3
if: failure()
with:
name: Received-${{ runner.os }}
path: "generator/actual_*"
- name: Upload test results
uses: actions/upload-artifact@v3
if: always()
with:
name: TestResults-${{ runner.os }}
path: generator/build/reports/tests/test
- name: SonarQube
env:
SONAR_LOGIN: ${{ secrets.SONAR_LOGIN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
working-directory: ./generator
if: ${{ github.ref == 'refs/heads/v3' }}
run: ./gradlew sonarqube -Dsonar.login=$SONAR_LOGIN