Skip to content

Commit 19821c2

Browse files
authored
ci: add github actions to check dist folder (#4)
1 parent 7a50dcb commit 19821c2

File tree

2 files changed

+58
-6
lines changed

2 files changed

+58
-6
lines changed

.github/workflows/code_health.yaml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
name: Code Health
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: GitHubSecurityLab/actions-permissions/monitor@v1
13+
with:
14+
config: ${{ vars.PERMISSIONS_CONFIG }}
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
- uses: actions/setup-node@v4
18+
with:
19+
node-version-file: package.json
20+
- name: install dependencies
21+
run: |
22+
npm ci
23+
- name: build
24+
run: |
25+
npm run build
26+
- name: Check for uncommitted files
27+
run: |
28+
export FILES=
29+
FILES=$(git ls-files -o -m --directory --exclude-standard --no-empty-directory)
30+
export LINES=
31+
LINES=$(echo "$FILES" | awk 'NF' | wc -l)
32+
if [ "$LINES" -ne 0 ]; then
33+
echo "Detected files that need to be committed:"
34+
echo "${FILES}"
35+
echo ""
36+
echo "Try running: npm run build"
37+
exit 1
38+
fi
39+
prettier:
40+
name: Prettier Check
41+
runs-on: ubuntu-latest
42+
steps:
43+
- uses: GitHubSecurityLab/actions-permissions/monitor@v1
44+
with:
45+
config: ${{ vars.PERMISSIONS_CONFIG }}
46+
- name: Checkout Repository
47+
uses: actions/checkout@v2
48+
- name: Run Prettier
49+
id: prettier-run
50+
uses: rutajdash/prettier-cli-action@d42c4325a3b344f3bd4be482bc34de521998d557
51+
with:
52+
config_path: ./.prettierrc.yml
53+
- name: Prettier Output
54+
if: ${{ failure() }}
55+
shell: bash
56+
run: |
57+
echo "The following files are not formatted:"
58+
echo "${{steps.prettier-run.outputs.prettier_output}}"

README.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
<<<<<<< HEAD
2-
3-
# atlas-mcp-server
4-
5-
# TBD
6-
71
# Atlas MCP Server PoC
82

93
A Model Context Protocol server for interacting with MongoDB Atlas.

0 commit comments

Comments
 (0)