[1.7.x] Update Ballerina lang version #3033
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: PR build | |
on: | |
pull_request: | |
push: | |
branches-ignore: | |
- master | |
- "automated/dependency_version_update" | |
- "automated/dependency_version_update_tmp" | |
jobs: | |
ubuntu-build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK 11.0.7 | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'adopt' | |
java-version: 11 | |
- name: Build with Gradle | |
env: | |
packageUser: ${{ github.actor }} | |
packagePAT: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
./gradlew build codeCoverageReport --stacktrace --scan --console=plain --no-daemon | |
- name: Generate Codecov Report | |
if: github.event_name == 'pull_request' | |
uses: codecov/codecov-action@v1 | |
windows-build: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK 11.0.7 | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'adopt' | |
java-version: 11 | |
- name: Build with Gradle | |
env: | |
packageUser: ${{ github.actor }} | |
packagePAT: ${{ secrets.GITHUB_TOKEN }} | |
JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8 | |
run: ./gradlew.bat build --stacktrace --scan --console=plain --no-daemon | |
sonarcloud_scan: | |
name: Build with sonarcloud scan on Ubuntu | |
runs-on: ubuntu-latest | |
timeout-minutes: 120 | |
concurrency: | |
group: ${{ github.head_ref }}-ubuntu | |
cancel-in-progress: true | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'temurin' | |
java-version: '11' | |
- name: Initialize sub-modules | |
run: git submodule update --init | |
- name: Cache SonarCloud packages | |
uses: actions/cache@v1 | |
with: | |
path: ~/.sonar/cache | |
key: ${{ runner.os }}-sonar | |
restore-keys: ${{ runner.os }}-sonar | |
- name: Build with Gradle | |
env: | |
packageUser: ${{ github.actor }} | |
packagePAT: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
if: "${{ env.SONAR_TOKEN != '' }}" | |
run: | | |
export DISPLAY=':99.0' | |
/usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & | |
./gradlew build sonarqube --info -x test -x check --max-workers=2 --scan --no-daemon | |
find ~/.gradle/caches/ -name "*.lock" -type f -delete | |
- name: Print log message | |
env: | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
if: "${{ env.SONAR_TOKEN == '' }}" | |
run: echo "Sonarcloud scan is skipped" |