File tree Expand file tree Collapse file tree 3 files changed +20
-5
lines changed
Expand file tree Collapse file tree 3 files changed +20
-5
lines changed Original file line number Diff line number Diff line change 5252 uses : docker/setup-compose-action@v1.1.0
5353
5454 - name : Run Node.js tests with Node ${{ matrix.node-version }}
55+ env :
56+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
5557 run : docker compose run --rm test-js
5658
5759 # Test Node.js SDK on macOS (darwin-arm64)
7678 run : brew install go-task
7779
7880 - name : Setup project
81+ env :
82+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
7983 run : task setup
8084
8185 - name : Build Node.js addon
@@ -125,6 +129,8 @@ jobs:
125129 pip install build pytest python-dotenv pybind11 scikit-build-core
126130
127131 - name : Setup SDK
132+ env :
133+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
128134 run : task setup
129135
130136 - name : Build Python module
@@ -170,6 +176,8 @@ jobs:
170176 pip install build pytest python-dotenv pybind11 scikit-build-core
171177
172178 - name : Setup project
179+ env :
180+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
173181 run : task setup
174182
175183 - name : Build Python module
Original file line number Diff line number Diff line change @@ -48,6 +48,8 @@ services:
4848 context : .
4949 args :
5050 TARGET : js
51+ environment :
52+ - GITHUB_TOKEN
5153 ports :
5254 - " 8080:8080"
5355 command : sh -c "task build:js && task manual:js"
Original file line number Diff line number Diff line change @@ -69,11 +69,16 @@ function isLibDirectoryEmpty(libPath) {
6969// Simple fetch implementation using https module for better compatibility
7070function httpsGet ( url ) {
7171 return new Promise ( ( resolve , reject ) => {
72- https . get ( url , {
73- headers : {
74- 'User-Agent' : 'rtms-build-script'
75- }
76- } , ( res ) => {
72+ const headers = {
73+ 'User-Agent' : 'rtms-build-script'
74+ } ;
75+
76+ // Use GitHub token if available (for CI/CD to avoid rate limits)
77+ if ( process . env . GITHUB_TOKEN ) {
78+ headers [ 'Authorization' ] = `Bearer ${ process . env . GITHUB_TOKEN } ` ;
79+ }
80+
81+ https . get ( url , { headers } , ( res ) => {
7782 let data = '' ;
7883
7984 res . on ( 'data' , ( chunk ) => {
You can’t perform that action at this time.
0 commit comments