[pull] main from RooVetGit:main #36
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Code QA Roo Code | |
on: | |
workflow_dispatch: | |
push: | |
branches: [main] | |
pull_request: | |
types: [opened, reopened, ready_for_review, synchronize] | |
branches: [main] | |
jobs: | |
qa: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '18' | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm run install:all | |
- name: Run lint, check types, and esbuild | |
run: npm run qa | |
unit-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '18' | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm run install:all | |
- name: Run unit tests | |
run: npm test | |
check-openrouter-api-key: | |
runs-on: ubuntu-latest | |
outputs: | |
exists: ${{ steps.openrouter-api-key-check.outputs.defined }} | |
steps: | |
- name: Check if OpenRouter API key exists | |
id: openrouter-api-key-check | |
shell: bash | |
run: | | |
if [ "${{ secrets.OPENROUTER_API_KEY }}" != '' ]; then | |
echo "defined=true" >> $GITHUB_OUTPUT; | |
else | |
echo "defined=false" >> $GITHUB_OUTPUT; | |
fi | |
integration-test: | |
runs-on: ubuntu-latest | |
needs: [check-openrouter-api-key] | |
if: needs.check-openrouter-api-key.outputs.exists == 'true' | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '18' | |
cache: 'npm' | |
- name: Create env.e2e file | |
run: echo "OPENROUTER_API_KEY=${{ secrets.OPENROUTER_API_KEY }}" > .env.e2e | |
- name: Install dependencies | |
run: npm run install:all | |
- name: Run end-to-end tests | |
run: xvfb-run -a npm run e2e |