From 64309c79ac9ead3c19f7ea834cd077eab1ed250a Mon Sep 17 00:00:00 2001 From: Kenta Kase Date: Tue, 19 Sep 2023 19:30:04 +0900 Subject: [PATCH] Create dist js size json for octocov --- .github/workflows/ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1f5486b..fa68c47 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,7 +34,13 @@ jobs: git diff exit 1 fi + - name: Create dist/*.js size json + run: | + inner=$(find ./dist -type f -printf '%s %f\n' | jq -s -R 'split("\n") | map(select(. != "")) | map(split(" ")) | map({"value": .[0], "key": .[1], "unit": "byte"})') + jq -n --arg key "dist_size" --arg name "dist_size" --argjson metrics "$inner" '$ARGS.named' > dist_js_sizes.json - uses: k1LoW/octocov-action@v0 + env: + OCTOCOV_CUSTOM_METRICS_DIST_JS: dist_js_sizes.json test: runs-on: ubuntu-latest steps: