chore: run only client tests #49
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 Go Tests | |
| on: | |
| push: | |
| branches: | |
| - '**' | |
| pull_request: | |
| branches: | |
| - '**' | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.24' | |
| - name: Restore cached cookies | |
| id: cache-cookies-restore | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: | | |
| cookies | |
| key: ${{ runner.os }}-cookies | |
| - name: Verify environment variables | |
| env: | |
| OPENAI_TOKEN: ${{ secrets.OPENAI_TOKEN }} | |
| GOPHER_CLIENT_TOKEN: ${{ secrets.GOPHER_CLIENT_TOKEN }} | |
| GOPHER_CLIENT_URL: ${{ secrets.GOPHER_CLIENT_URL }} | |
| GOPHER_CLIENT_TIMEOUT: ${{ secrets.GOPHER_CLIENT_TIMEOUT }} | |
| run: | | |
| echo "Checking environment variables..." | |
| if [ -z "$OPENAI_TOKEN" ]; then echo "ERROR: OPENAI_TOKEN is not set"; exit 1; else echo "✓ OPENAI_TOKEN is set"; fi | |
| if [ -z "$GOPHER_CLIENT_TOKEN" ]; then echo "ERROR: GOPHER_CLIENT_TOKEN is not set"; exit 1; else echo "✓ GOPHER_CLIENT_TOKEN is set (length: ${#GOPHER_CLIENT_TOKEN})"; fi | |
| if [ -z "$GOPHER_CLIENT_URL" ]; then echo "ERROR: GOPHER_CLIENT_URL is not set"; exit 1; else echo "✓ GOPHER_CLIENT_URL is set: $GOPHER_CLIENT_URL"; fi | |
| if [ -z "$GOPHER_CLIENT_TIMEOUT" ]; then echo "WARN: GOPHER_CLIENT_TIMEOUT is not set, will use default"; else echo "✓ GOPHER_CLIENT_TIMEOUT is set: $GOPHER_CLIENT_TIMEOUT"; fi | |
| - name: Run tests | |
| env: | |
| OPENAI_TOKEN: ${{ secrets.OPENAI_TOKEN }} | |
| GOPHER_CLIENT_TOKEN: ${{ secrets.GOPHER_CLIENT_TOKEN }} | |
| GOPHER_CLIENT_URL: ${{ secrets.GOPHER_CLIENT_URL }} | |
| GOPHER_CLIENT_TIMEOUT: ${{ secrets.GOPHER_CLIENT_TIMEOUT }} | |
| run: make test | |
| ready-to-merge: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v2 | |
| - name: Verify that merging is OK | |
| run: | | |
| if grep -rE 'DO[ ]NOT[ ]MERGE|[ ]FIXME' .; then | |
| exit 1 | |
| fi |