feat: add a Go SDK alongside the Python and Node.js ports (#119) #382
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: Node.js Package | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'nodejs/**' | |
| - '.github/workflows/node-package.yml' | |
| pull_request: | |
| paths: | |
| - 'nodejs/**' | |
| - '.github/workflows/node-package.yml' | |
| schedule: | |
| - cron: '0 0 */7 * *' | |
| workflow_dispatch: | |
| defaults: | |
| run: | |
| working-directory: ./nodejs | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| node-version: ['18.x', '20.x', '22.x'] | |
| steps: | |
| - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 | |
| - name: Set up NodeJS ${{ matrix.node-version }} | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Lint | |
| run: npm run lint | |
| - name: Type check | |
| run: npm run test:types | |
| - name: Offline tests (PR gate) | |
| run: npm run test:offline | |
| - name: Integration tests (live FR24) | |
| uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 | |
| with: | |
| timeout_minutes: 10 | |
| max_attempts: 3 | |
| command: cd nodejs && npm run test:integration | |
| continue-on-error: ${{ github.event_name == 'push' }} | |
| - name: Dependency audit (shipped dependencies) | |
| # Enforced, and no `cd`: this job already defaults into ./nodejs, so the | |
| # old `cd nodejs` failed every run and continue-on-error hid it, which | |
| # is how the undici floor stayed vulnerable unnoticed. | |
| if: matrix.node-version == '22.x' | |
| run: npm audit --omit=dev --audit-level=high |