DOCSP-46221: Atlas SDK for Go Monitoring & Logging scripts for Atlas Architecture Center #6
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: Test JavaScript Code Examples against Atlas | |
on: | |
pull_request_target: | |
types: [opened, synchronize] | |
paths: | |
- "javascript/examples/**" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check access | |
if: ${{ github.event.pull_request.author_association != 'COLLABORATOR' }} | |
run: | | |
echo "Event not triggered by a collaborator." | |
exit 1 | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '22' | |
- name: Install dependencies | |
run: | | |
cd javascript/ | |
npm install | |
- name: Create environment file with connection string | |
run: | | |
cd javascript/ | |
touch .env | |
echo "ATLAS_CONNECTION_STRING=\"${{secrets.JAVASCRIPT_CONNECTION_STRING}}\"" >> .env | |
echo "ENV=\"Atlas\"" >> .env | |
- name: Run tests | |
run: | | |
cd javascript/ | |
npm test |