mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-25 17:55:15 -06:00
workflow: update benchmarks notebook generation
Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
This commit is contained in:
committed by
Stephan Renatus
parent
882d5a7117
commit
7bc92c6075
@@ -55,7 +55,7 @@ jobs:
|
||||
--input changed_files.json \
|
||||
--format pretty \
|
||||
'data.policy["pr-check"]' > opa_result.json
|
||||
|
||||
|
||||
go_result=$(jq -r '.changes.go // false' opa_result.json)
|
||||
|
||||
echo "go=${go_result}" >> $GITHUB_OUTPUT
|
||||
@@ -88,21 +88,33 @@ jobs:
|
||||
with:
|
||||
ref: benchmarks
|
||||
persist-credentials: true
|
||||
- name: Install Node
|
||||
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
||||
- name: Setup Java
|
||||
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
|
||||
with:
|
||||
node-version: 25
|
||||
distribution: 'temurin'
|
||||
java-version: '21'
|
||||
- name: Setup Clojure
|
||||
uses: DeLaGuardo/setup-clojure@02f5a82b79a547523e664fe8a7a32ea14884d7b2 # 13.6.0
|
||||
with:
|
||||
cli: latest
|
||||
- name: Cache Clojure dependencies
|
||||
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
|
||||
with:
|
||||
path: |
|
||||
~/.m2/repository
|
||||
~/.gitlibs
|
||||
key: clj-${{ hashFiles('clay/deps.edn') }}
|
||||
restore-keys: clj-
|
||||
- name: Clean previous output
|
||||
run: rm -rf docs/*.html
|
||||
- name: update notebook
|
||||
run: |
|
||||
npm ci
|
||||
cp ../benchmarks.json . # nodejs data loader can't access ../
|
||||
npm run docs:build
|
||||
rm benchmarks.json
|
||||
working-directory: src/
|
||||
clojure -M -m opa-bench.generate
|
||||
working-directory: clay/
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: commit if changed
|
||||
working-directory: benchmarks/ # output dir of the docs:build command
|
||||
working-directory: docs/
|
||||
run: |
|
||||
if ! git diff-index --quiet HEAD -- .; then
|
||||
git config --local user.email "${GITHUB_ACTOR}@users.noreply.github.com"
|
||||
|
||||
Reference in New Issue
Block a user