Pull request for issue #28 #32
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: Run tests | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| jobs: | |
| test: | |
| # Only run if PR author has write access or is a collaborator | |
| if: >- | |
| (github.event.pull_request.author_association == 'COLLABORATOR' || | |
| github.event.pull_request.author_association == 'OWNER' || | |
| github.event.pull_request.author_association == 'MEMBER') || | |
| github.actor == 'jules[bot]' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Create Google credentials file | |
| shell: bash | |
| run: | | |
| echo "$GOOGLE_APPLICATION_CREDENTIALS_JSON" > google-credentials.json | |
| env: | |
| GOOGLE_APPLICATION_CREDENTIALS_JSON: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS_JSON }} | |
| - name: Run Vitest tests | |
| env: | |
| GOOGLEAI_API_KEY: ${{ secrets.GOOGLEAI_API_KEY }} | |
| GOOGLE_APPLICATION_CREDENTIALS: ./google-credentials.json | |
| run: npm test |