Skip to content

Commit 8aa1980

Browse files
committed
Merge branch 'ni/assert-atlas-search' into ni/atlas-search
2 parents 5221d92 + d6d55a8 commit 8aa1980

26 files changed

+838
-235
lines changed

.github/workflows/code-health-fork.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,18 @@ jobs:
3939
env:
4040
SKIP_ATLAS_TESTS: "true"
4141
SKIP_ATLAS_LOCAL_TESTS: "true"
42-
- name: Upload test results
43-
if: always() && matrix.os == 'ubuntu-latest'
44-
uses: actions/upload-artifact@v5
42+
run-atlas-local-tests:
43+
name: Run Atlas Local tests
44+
if: github.event.pull_request.user.login == 'dependabot[bot]'
45+
runs-on: ubuntu-latest
46+
steps:
47+
- uses: GitHubSecurityLab/actions-permissions/monitor@v1
48+
- uses: actions/checkout@v5
49+
- uses: actions/setup-node@v4
4550
with:
46-
name: test-results
47-
path: coverage/lcov.info
51+
node-version-file: package.json
52+
cache: "npm"
53+
- name: Install dependencies
54+
run: npm ci
55+
- name: Run tests
56+
run: npm test -- tests/integration/tools/atlas-local/

.github/workflows/code-health.yml

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,17 +115,17 @@ jobs:
115115
- name: Install dependencies
116116
run: npm ci
117117
- name: Download test results
118-
uses: actions/download-artifact@v5
118+
uses: actions/download-artifact@v6
119119
with:
120120
name: test-results
121121
path: coverage/mongodb
122122
- name: Download atlas test results
123-
uses: actions/download-artifact@v5
123+
uses: actions/download-artifact@v6
124124
with:
125125
name: atlas-test-results
126126
path: coverage/atlas
127127
- name: Download atlas local test results
128-
uses: actions/download-artifact@v5
128+
uses: actions/download-artifact@v6
129129
with:
130130
name: atlas-local-test-results
131131
path: coverage/atlas-local
@@ -136,3 +136,22 @@ jobs:
136136
uses: coverallsapp/github-action@v2.3.6
137137
with:
138138
file: coverage/lcov.info
139+
140+
run-git-secrets:
141+
name: Run git secrets
142+
if: github.event_name == 'push' || (github.event.pull_request.user.login != 'dependabot[bot]' && github.event.pull_request.head.repo.full_name == github.repository)
143+
runs-on: ubuntu-latest
144+
steps:
145+
- uses: GitHubSecurityLab/actions-permissions/monitor@v1
146+
- uses: actions/checkout@v5
147+
with:
148+
persist-credentials: false
149+
- uses: actions/setup-node@v6
150+
with:
151+
node-version-file: package.json
152+
cache: "npm"
153+
- name: Install dependencies
154+
run: |
155+
sudo apt-get install -y git-secrets
156+
- name: Run git-secrets
157+
run: git-secrets --register-aws && git-secrets --scan

.husky/pre-commit

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
if [ ! "$(which git-secrets)" ]
4+
then
5+
echo "git-secrets is not installed. Please run 'brew install git-secrets' or visit https://github.com/awslabs/git-secrets#installing-git-secrets"
6+
exit 1
7+
fi
8+
9+
git-secrets --register-aws > /dev/null
10+
git-secrets --scan

0 commit comments

Comments
 (0)