Skip to content

Commit 12df5eb

Browse files
Fix
1 parent 28d09fa commit 12df5eb

File tree

1 file changed

+14
-23
lines changed

1 file changed

+14
-23
lines changed

.github/workflows/release-IPA-metrics.yml

Lines changed: 14 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,24 @@ env:
1212
NODE_VERSION: '20.x'
1313
OAS_BRANCH: 'dev'
1414
OAS_FILE: 'openapi/v2.json'
15-
DEV_OAS_PATH: ${{ github.workspace }}/dev-oas
1615

1716
jobs:
1817
# Generates and uploads the IPA validation metrics to S3
1918
release-IPA-metrics:
2019
name: Release IPA Validation Metrics
2120
runs-on: ubuntu-latest
2221
steps:
23-
- name: Checkout repository (dev branch)
22+
- name: Fetch OAS file from Dev Branch
2423
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
2524
with:
2625
ref: ${{ env.OAS_BRANCH }}
2726
sparse-checkout: ${{ env.OAS_FILE }}
28-
path: dev-oas
27+
28+
- name: Upload OAS file
29+
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08
30+
with:
31+
name: oas-dev
32+
path: ${{ env.OAS_FILE }}
2933

3034
- name: Checkout repository (scripts)
3135
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
@@ -35,23 +39,6 @@ jobs:
3539
package.json
3640
package-lock.json
3741

38-
- name: Validate OAS file
39-
run: |
40-
if [ ! -f "${{ env.DEV_OAS_PATH }}/${{ env.OAS_FILE }}" ]; then
41-
ls -la
42-
echo "::error::OAS file not found in ${{ env.OAS_BRANCH }} branch"
43-
exit 1
44-
fi
45-
46-
- name: Debug Checkout
47-
run: |
48-
echo "Workspace Contents:"
49-
ls -la
50-
echo "Tools Spectral Contents:"
51-
ls -la tools/spectral
52-
echo "IPA Contents:"
53-
ls -la tools/spectral/ipa || echo "ipa directory is missing!"
54-
5542
- name: Setup Node
5643
uses: actions/setup-node@v4
5744
with:
@@ -61,10 +48,14 @@ jobs:
6148
- name: Install npm dependencies
6249
run: npm install
6350

51+
- name: Download oas-dev
52+
uses: actions/download-artifact@v4
53+
with:
54+
name: oas-dev
55+
6456
- name: Run Metric Collection Job
65-
working-directory: tools/spectral/ipa
66-
run: ls -la
67-
# node runMetricCollection.js "${{ env.DEV_OAS_PATH }}/openapi/v2.json"
57+
working-directory: tools/spectral/ipa/metrics/scripts
58+
run: node runMetricCollection.js ${{ env.OAS_FILE }}
6859

6960
# - name: Dump Metric Collection Job Data to S3
7061
# env:

0 commit comments

Comments
 (0)