Skip to content

Commit

Permalink
Merge pull request #26 from getappmap/feat/thread-count
Browse files Browse the repository at this point in the history
feat: Thread count
  • Loading branch information
kgilpin authored Aug 15, 2023
2 parents a017bcf + 0e4ca63 commit ebb7f05
Show file tree
Hide file tree
Showing 22 changed files with 25,618 additions and 7,443 deletions.
25 changes: 15 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,29 +24,34 @@ jobs:
- name: Install AppMap
uses: getappmap/[email protected]
with:
verbose: true
tools-url: https://github.com/getappmap/appmap-js/releases/download/%40appland%2Fappmap-faster-v1.0-pre.2/appmap-linux-x64
github-token: ${{ secrets.GITHUB_TOKEN }}
project-type: yarn

- name: Build
run: yarn build

- name: Test
run: yarn test

- name: Commit changes
# If you forgot to package the distribution, you'll see a commit added to your PR
uses: EndBug/add-and-commit@v7
with:
add: dist
message: 'chore: Packaged distribution of the GitHub action'

- name: Archive AppMaps
uses: getappmap/archive-appmap-action@v1-pre.13
uses: getappmap/archive-appmap-action@v1-pre.14
if: github.event_name != 'pull_request'

- name: Analyze AppMaps
uses: ./
if: (success() || failure()) && github.event_name == 'pull_request'
with:
base-revision: origin/main
base-revision: ${{ github.event.pull_request.base.sha }}
head-revision: ${{ github.event.pull_request.head.sha }}
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Build GitHub action
run: yarn package

- name: Commit changes
# If you forgot to package the distribution, you'll see a commit added to your PR
uses: EndBug/add-and-commit@v7
with:
add: dist
message: 'chore: Packaged distribution of the GitHub action'
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# getappmap/preflight-appmap-action
# getappmap/analyze-action

GitHub action to build a preflight report of a repo.
GitHub action to analyze the changes between two code revisions.

## Development

Expand All @@ -20,6 +20,5 @@ $ yarn package

## TODO

- [ ] Add description to action.yml.
- [x] Add description to action.yml.
- [ ] Update repo description in GitHub.
- [ ] Use appmap-action-utils
25 changes: 19 additions & 6 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
name: AppMap Analysis
description: Analyze the changes between two code revisions.
description: |
Analyze the changes between two code revisions. The analysis is performed by
comparing two AppMap archives - "base" and "head". The "base" archive is created by the
`getappmap/archive-action` action when code is merged to main. The "head" archive is created
by this action. The action will generate a report containing the differences between the two
archives. The report includes information such as root cause analysis of failed tests,
a list of API changes, new and resolved analysis findings (anti-patterns and flaws),
and lists of new and changed AppMaps. This action will also add code annotations to identify
the root cause of failed tests and analysis findings.
inputs:
base-revision:
description: |
Expand All @@ -18,17 +26,22 @@ inputs:
The number of days of history to fetch in order to find the most recent ancestor that has
an AppMap archive. The default is 30 days. If an archive is not found, within this time window,
the entire history will be fetched. To disable history fetching completely, set this value to 0.
verbose:
description: Enable verbose logging.
default: 'false'
thread-count:
description:
Number of worker threads to use for processing the archive. Defaults to the number of CPUs /
cores, as reported by Node.js. If the worker machine has a high number of CPUs/cores, the
archive action may become I/O-bound rather than CPU-bound, and better performance might be
obtained by setting this value to a lower number.
annotation-exclusions:
descriptions: |
description: |
Directories to ignore when generating annotations. Please enter the exclusions as a space-separated
list (e.g. build tmp dist).
default: node_modules vendor
verbose:
description: Enable verbose logging.
outputs:
report-dir:
description: Directory containing the report files.
runs:
using: 'node16'
main: 'dist/preflight/index.js'
main: 'dist/analyze/index.js'
2 changes: 1 addition & 1 deletion appmap.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: preflight-appmap-action
name: analyze-action
packages:
- path: build
- path: src
Expand Down
14 changes: 0 additions & 14 deletions check/action.yml

This file was deleted.

Loading

0 comments on commit ebb7f05

Please sign in to comment.