Skip to content

Commit

Permalink
ci: Add build triggers and analysis step
Browse files Browse the repository at this point in the history
  • Loading branch information
petecheslock committed Sep 6, 2023
1 parent f0e67f8 commit 217b43a
Showing 1 changed file with 20 additions and 21 deletions.
41 changes: 20 additions & 21 deletions .github/workflows/appmap-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ name: appmap-analysis

on:
pull_request:
push:
branches:
- master
schedule:
- cron: '0 0 * * 0'

jobs:
record-appmaps:
Expand Down Expand Up @@ -48,10 +53,11 @@ jobs:
- name: Set matrix group env var with zero-based numbering
if: always()
id: set-matrix-group-var
env:
NUM: ${{ matrix.group }}
run: |
echo "ARCHIVE_ID=$(($NUM - 1))" >> $GITHUB_ENV
echo "ARCHIVE_ID=$(($NUM - 1))" >> $GITHUB_OUTPUT
- name: Delete Request AppMaps
if: always()
Expand All @@ -60,29 +66,22 @@ jobs:
- name: Save AppMap archive
if: always()
env:
ARCHIVE_ID: ${{ steps.set-matrix-group-var.outputs.ARCHIVE_ID }}
uses: getappmap/archive-action@v1
with:
archive-id: ${{ env.ARCHIVE_ID }}

appmap-analysis:
if: always()
runs-on: ubuntu-latest
needs: [ record-appmaps ]

steps:
- uses: actions/checkout@v3
- name: Install AppMap tools
uses: getappmap/install-action@v1
with:
install-appmap-library: false

- name: Merge AppMaps
uses: getappmap/archive-action/merge@v1
with:
revision: ${{ github.event.pull_request.base.sha }}
archive-count: 17

- name: Archive AppMaps
uses: getappmap/archive-action@v1
with:
revision: ${{ github.event.pull_request.base.sha }}
needs: [test]
uses: getappmap/analyze-action/.github/workflows/appmap-analysis-matrix.yml@v1
env:
ARCHIVE_ID: ${{ steps.set-matrix-group-var.outputs.ARCHIVE_ID }}
with:
archive-count: ${{ env.ARCHIVE_ID }}
permissions:
actions: read
contents: read
checks: write
pull-requests: write

0 comments on commit 217b43a

Please sign in to comment.