Files
rea/examples/github-actions/rea-analysis.yml
T
3075064d69 ci(deps): upgrade setup-node to 7.1.0 and preserve explicit npm cache policy (#8133)
* chore(deps): bump actions/setup-node from 4.4.0 to 7.1.0

Bumps [actions/setup-node](https://github.com/actions/setup-node) from 4.4.0 to 7.1.0.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v4.4.0...949feb2413d6458794dcd2491c4babbbce0c15c1)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: 7.1.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* ci: record affected-test predictions above the live cutoff (#14300)

* ci: compare frozen selections with observed test failures (#14301)

* chore(deps): bump markdownify from 1.2.3 to 1.2.4 in /website (#14227)

Bumps [markdownify](https://github.com/matthewwithanm/python-markdownify) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/matthewwithanm/python-markdownify/releases)
- [Commits](https://github.com/matthewwithanm/python-markdownify/compare/1.2.3...1.2.4)

---
updated-dependencies:
- dependency-name: markdownify
  dependency-version: 1.2.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump rcssmin from 1.2.2 to 1.3.0 in /website (#14229)

Bumps [rcssmin](https://github.com/ndparker/rcssmin) from 1.2.2 to 1.3.0.
- [Changelog](https://github.com/ndparker/rcssmin/blob/master/CHANGES)
- [Commits](https://github.com/ndparker/rcssmin/compare/1.2.2...1.3.0)

---
updated-dependencies:
- dependency-name: rcssmin
  dependency-version: 1.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(ci): retry recorded crash dependency acquisition without stale index cache (#14076)

Co-authored-by: ShuaixinHuang <ShuaixinHuang@users.noreply.github.com>

* ci: publish the portable build cache only for selected consumers (#14307)

* ci: run the verified actionlint release binary (#14309)

* chore(deps): bump pyyaml from 6.0.3 to 6.0.4 in /website (#14228)

Bumps [pyyaml](https://github.com/yaml/pyyaml) from 6.0.3 to 6.0.4.
- [Release notes](https://github.com/yaml/pyyaml/releases)
- [Changelog](https://github.com/yaml/pyyaml/blob/6.0.4/CHANGES)
- [Commits](https://github.com/yaml/pyyaml/compare/6.0.3...6.0.4)

---
updated-dependencies:
- dependency-name: pyyaml
  dependency-version: 6.0.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* test(ci): narrow workflow steps at the cache policy boundary

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
Co-authored-by: ShuaixinHuang <1836656514@qq.com>
Co-authored-by: ShuaixinHuang <ShuaixinHuang@users.noreply.github.com>
2026-11-24 17:58:42 +08:00

62 lines
2.4 KiB
YAML

# Copy to .github/workflows/rea-analysis.yml on your default branch.
name: REA static analysis example
on:
workflow_dispatch:
permissions:
contents: read
jobs:
analyze:
runs-on: ubuntu-24.04
timeout-minutes: 10
env:
ARTIFACT_PATH: build/rea-ci-demo
steps:
- name: Prepare isolated report directory
id: reports
shell: bash
run: |
directory=$(mktemp -d "${RUNNER_TEMP:?}/rea-analysis.XXXXXX")
printf 'directory=%s\n' "${directory}" >> "${GITHUB_OUTPUT:?}"
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
persist-credentials: false
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
package-manager-cache: false
node-version: "24.22.1"
- name: Install pinned REA
run: |
npm install --prefix "${RUNNER_TEMP}/rea-tool" --no-audit --no-fund --ignore-scripts --save-exact rea-agents@6.10.1
echo "${RUNNER_TEMP}/rea-tool/node_modules/.bin" >> "${GITHUB_PATH}"
- name: Build a known artifact
id: build
run: |
# Replace this step with your reviewed build, keeping ARTIFACT_PATH in sync.
mkdir -p build/rea-ci-demo
printf '%s\n' '{"name":"rea-ci-demo","version":"1.0.0","type":"module","main":"index.js"}' > build/rea-ci-demo/package.json
printf '%s\n' 'export const message = "hello";' 'throw new Error("This artifact must not be executed.");' > build/rea-ci-demo/index.js
- name: Analyze and retain the original exit status
id: analyze
shell: bash
env:
REPORT_DIR: ${{ steps.reports.outputs.directory }}
run: |
set +e
rea analyze-javascript-application "${GITHUB_WORKSPACE}/${ARTIFACT_PATH}" --json --full-output \
> "${REPORT_DIR}/analysis.json" 2> "${REPORT_DIR}/analysis.stderr"
status=$?
set -e
printf '%s\n' "${status}" > "${REPORT_DIR}/exit-code.txt"
exit "${status}"
- name: Upload available reports, including after analysis failure
if: ${{ always() && steps.reports.outputs.directory != '' }}
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: rea-analysis
path: ${{ steps.reports.outputs.directory }}
if-no-files-found: warn
retention-days: 7