File tree Expand file tree Collapse file tree 1 file changed +20
-10
lines changed
Expand file tree Collapse file tree 1 file changed +20
-10
lines changed Original file line number Diff line number Diff line change @@ -43,11 +43,25 @@ jobs:
4343 - name : Run unit tests
4444 run : npm test
4545
46+ check-openrouter-api-key :
47+ runs-on : ubuntu-latest
48+ outputs :
49+ exists : ${{ steps.openrouter-api-key-check.outputs.defined }}
50+ steps :
51+ - name : Check if OpenRouter API key exists
52+ id : openrouter-api-key-check
53+ shell : bash
54+ run : |
55+ if [ "${{ secrets.OPENROUTER_API_KEY }}" != '' ]; then
56+ echo "defined=true" >> $GITHUB_OUTPUT;
57+ else
58+ echo "defined=false" >> $GITHUB_OUTPUT;
59+ fi
60+
4661 integration-test :
47- strategy :
48- matrix :
49- os : [ubuntu-latest] # macos-latest, windows-latest
50- runs-on : ${{ matrix.os }}
62+ runs-on : ubuntu-latest
63+ needs : [check-openrouter-api-key]
64+ if : needs.check-openrouter-api-key.outputs.exists == 'true'
5165 steps :
5266 - name : Checkout code
5367 uses : actions/checkout@v4
5872 cache : ' npm'
5973 - name : Create env.integration file
6074 run : echo "OPENROUTER_API_KEY=${{ secrets.OPENROUTER_API_KEY }}" > .env.integration
61- - name : Check env.integration file
62- run : cat .env.integration
6375 - name : Install dependencies
6476 run : npm run install:all
65- - run : xvfb-run -a npm run test:integration
66- if : runner.os == 'Linux'
67- - run : npm run test:integration
68- if : runner.os != 'Linux'
77+ - name : Run integration tests
78+ run : xvfb-run -a npm run test:integration
You can’t perform that action at this time.
0 commit comments