Run integration tests in CI #1326
Workflow file for this run
This file contains hidden or 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: | |
| compile: | |
| 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: Compile | |
| run: npm run compile | |
| - name: Check types | |
| run: npm run check-types | |
| - name: Lint | |
| run: npm run lint | |
| 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 | |
| integration-test: | |
| strategy: | |
| matrix: | |
| os: [macos-latest] # ubuntu-latest, windows-latest | |
| runs-on: ${{ matrix.os }} | |
| 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.integration file | |
| run: echo "OPEN_ROUTER_API_KEY=${{ secrets.OPEN_ROUTER_API_KEY }}" > .env.integration | |
| - name: Install dependencies | |
| run: npm run install:all | |
| - run: xvfb-run -a npm run test:integration | |
| if: runner.os == 'Linux' | |
| - run: npm run test:integration | |
| if: runner.os != 'Linux' |