feat: exchange price proxying Binance #28
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: Build | |
| on: | |
| pull_request: | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Cache Docker layers | |
| uses: actions/cache@v4 | |
| with: | |
| path: /tmp/.buildx-cache | |
| key: ${{ runner.os }}-buildx-${{ github.sha }} | |
| restore-keys: | | |
| ${{ runner.os }}-buildx- | |
| - name: Build Docker image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| push: false | |
| load: true | |
| tags: juno-api:test | |
| cache-from: type=local,src=/tmp/.buildx-cache | |
| cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max | |
| - name: Run container | |
| run: | | |
| docker run -d --name juno-api-test \ | |
| -p 3000:3000 \ | |
| -e GITHUB_CLIENT_ID=test-client-id \ | |
| -e GITHUB_CLIENT_SECRET=test-client-secret \ | |
| -e GITHUB_AUTH_ISSUER=https://api.juno.build/auth/github \ | |
| juno-api:test | |
| - name: Wait for container to be ready | |
| run: | | |
| timeout 30 sh -c 'until curl -f http://localhost:3000/v1/auth/certs 2>/dev/null; do sleep 1; done' | |
| - name: Test JWKS endpoint | |
| run: | | |
| response=$(curl -s http://localhost:3000/v1/auth/certs) | |
| echo "$response" | jq -e '.keys[0].kid' | grep -q "juno-api-" | |
| echo "$response" | jq -e '.keys[0].n' | |
| echo "$response" | jq -e '.keys[0].e == "AQAB"' | |
| echo "✅ JWKS endpoint working" | |
| - name: Check container logs | |
| if: always() | |
| run: docker logs juno-api-test | |
| - name: Cleanup | |
| if: always() | |
| run: docker rm -f juno-api-test | |
| # Move cache to avoid unbounded growth | |
| - name: Move cache | |
| run: | | |
| rm -rf /tmp/.buildx-cache | |
| mv /tmp/.buildx-cache-new /tmp/.buildx-cache |