Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,16 @@ jobs:
--health-retries=10

env:
DEVKIT_NODE_db_uri: mongodb://mongo:27017/NodeTest
NODE_ENV: ${{ vars.APP_ENV || 'test' }}
Comment thread
PierreBrisorgueil marked this conversation as resolved.
DEVKIT_NODE_db_uri: ${{ secrets.MONGO_URI || vars.MONGO_URI || 'mongodb://mongo:27017/NodeTest' }}

steps:
- uses: actions/checkout@v4

- name: Wait for MongoDB
run: |
timeout 120 bash -c 'until node -e "const uri=process.env.DEVKIT_NODE_db_uri;let host=\"mongo\";let port=27017;try{if(uri){const u=new URL(uri);if(u.hostname)host=u.hostname;if(u.port)port=Number(u.port)||port;}}catch(e){}const s=require(\"net\").createConnection({host,port});s.setTimeout(5000);s.on(\"connect\",()=>{s.end();process.exit(0)});s.on(\"timeout\",()=>{s.destroy();process.exit(1)});s.on(\"error\",()=>process.exit(1))"; do echo "waiting for $DEVKIT_NODE_db_uri..."; sleep 1; done'

Comment thread
PierreBrisorgueil marked this conversation as resolved.
- run: npm ci

- run: npm run lint
Expand Down
Loading