File tree 1 file changed +13
-4
lines changed
1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change 25
25
run : pnpm run smokeTests
26
26
integration-tests :
27
27
runs-on : ubuntu-latest
28
+ env :
29
+ OPENAI_API_KEY : ${{ secrets.OPENAI_API_KEY }}
28
30
steps :
29
31
- uses : actions/checkout@v4
30
32
@@ -43,14 +45,21 @@ jobs:
43
45
- name : Build packages
44
46
run : pnpm build
45
47
48
+ - name : Check for API key
49
+ id : check_api_key
50
+ run : |
51
+ if [ -z "$OPENAI_API_KEY" ]; then
52
+ echo "::set-output name=api_key_present::false"
53
+ else
54
+ echo "::set-output name=api_key_present::true"
55
+ fi
56
+
46
57
- name : Run integration tests
47
- env :
48
- OPENAI_API_KEY : ${{ secrets.OPENAI_API_KEY }}
49
- if : ${{ env.OPENAI_API_KEY != '' }}
58
+ if : steps.check_api_key.outputs.api_key_present == 'true'
50
59
run : pnpm run integrationTests
51
60
52
61
- name : Skip integration tests
53
- if : ${{ env.OPENAI_API_KEY == '' }}
62
+ if : steps.check_api_key.outputs.api_key_present == 'false'
54
63
run : |
55
64
echo "Skipping integration tests due to missing required API keys"
56
65
exit 1
You can’t perform that action at this time.
0 commit comments