Build #242
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: Build | |
on: | |
pull_request: | |
push: | |
branches: | |
- develop | |
schedule: | |
- cron: "0 0 * * 0" | |
jobs: | |
test: | |
strategy: | |
matrix: | |
os: [ ubuntu-latest, windows-latest, macos-latest ] | |
name: Test ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 45 | |
steps: | |
- name: Fetch Sources | |
uses: actions/checkout@v3 | |
- name: Gradle Wrapper Validation | |
uses: gradle/wrapper-validation-action@v1 | |
- name: Setup Java | |
uses: actions/setup-java@v3 | |
with: | |
distribution: temurin | |
java-version: 17 | |
# https://docs.github.com/en/rest/overview/resources-in-the-rest-api?apiVersion=2022-11-28#rate-limits-for-requests-from-github-actions | |
- name: Show GitHub Actions rate limit | |
shell: bash | |
# curl is unavailable on Windows | |
if: runner.os != 'Windows' | |
run: | | |
curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" -i https://api.github.com/users/octocat | grep x-ratelimit | |
- name: Run Linters and Test (Linux and macOS) | |
if: runner.os != 'Windows' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
shell: bash | |
run: ./gradlew check | |
# Termination of AppMap CLI processes is failing with IC-2021.3 for unknown reasons (process.destroy() etc.) | |
- name: Run Linters and Test with 2023.2 (Windows) | |
if: runner.os == 'Windows' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
shell: bash | |
run: ./gradlew check -PideVersion=IC-2023.2.1 | |
- name: Verify plugin | |
shell: bash | |
run: ./gradlew verifyPlugin | |
- name: Run Plugin Verifier | |
shell: bash | |
# JetBrains plugin verifier should always report the same results, regardless of the OS | |
if: runner.os == 'Linux' | |
run: ./gradlew runPluginVerifier | |
- name: Upload Test Reports | |
uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: test-reports-${{ matrix.os }} | |
path: | | |
build/reports/ | |
**/build/reports/ | |
- name: Save AppMaps | |
uses: actions/cache/save@v3 | |
if: runner.os == 'Linux' | |
with: | |
path: ./tmp/appmap | |
key: appmaps-${{ github.sha }}-${{ github.run_attempt }} | |
appmap-analysis: | |
if: always() | |
needs: [test] | |
uses: getappmap/analyze-action/.github/workflows/appmap-analysis.yml@v1 | |
permissions: | |
actions: read | |
contents: read | |
checks: write | |
pull-requests: write |