CI #5
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: CI | |
on: | |
pull_request: | |
push: | |
branches: | |
- appmap-e2e | |
schedule: | |
- cron: "0 0 * * 0" | |
permissions: | |
# Read the baseline artifact in order to perform | |
# the AppMap comparison. | |
actions: read | |
# Commit the AppMap configuration. | |
# If the EndBug/add-and-commit is removed, | |
# this can be changed to 'read'. | |
contents: write | |
# Add check annotations to the source code when | |
# a problem is detected. | |
checks: write | |
# Add a comment to the pull request. | |
pull-requests: write | |
env: | |
APPMAP_TELEMETRY_DISABLED: "true" | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout step | |
uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: "temurin" | |
java-version: "8" | |
cache: "maven" | |
- name: Install AppMap tools | |
uses: getappmap/install-action@v1 | |
with: | |
project-type: maven | |
install-appmap-library: false | |
- name: Build and test | |
run: ./mvnw --no-transfer-progress test | |
- name: Archive AppMaps | |
if: github.event_name != 'pull_request' | |
uses: getappmap/archive-action@v1 | |
- name: Analyze AppMaps | |
# We want to analyze the AppMaps even if the tests fail. | |
if: (success() || failure()) && github.event_name == 'pull_request' | |
uses: getappmap/analyze-action@v1 | |
with: | |
base-revision: ${{ github.event.pull_request.base.sha }} | |
head-revision: ${{ github.event.pull_request.head.sha }} | |
github-token: ${{ secrets.GITHUB_TOKEN }} |