diff --git a/.github/workflows/code_health.yaml b/.github/workflows/code_health.yaml new file mode 100644 index 000000000..4e36b0a92 --- /dev/null +++ b/.github/workflows/code_health.yaml @@ -0,0 +1,58 @@ +--- +name: Code Health +on: + push: + branches: + - main + pull_request: +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: GitHubSecurityLab/actions-permissions/monitor@v1 + with: + config: ${{ vars.PERMISSIONS_CONFIG }} + - name: Checkout repository + uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version-file: package.json + - name: install dependencies + run: | + npm ci + - name: build + run: | + npm run build + - name: Check for uncommitted files + run: | + export FILES= + FILES=$(git ls-files -o -m --directory --exclude-standard --no-empty-directory) + export LINES= + LINES=$(echo "$FILES" | awk 'NF' | wc -l) + if [ "$LINES" -ne 0 ]; then + echo "Detected files that need to be committed:" + echo "${FILES}" + echo "" + echo "Try running: npm run build" + exit 1 + fi + prettier: + name: Prettier Check + runs-on: ubuntu-latest + steps: + - uses: GitHubSecurityLab/actions-permissions/monitor@v1 + with: + config: ${{ vars.PERMISSIONS_CONFIG }} + - name: Checkout Repository + uses: actions/checkout@v2 + - name: Run Prettier + id: prettier-run + uses: rutajdash/prettier-cli-action@d42c4325a3b344f3bd4be482bc34de521998d557 + with: + config_path: ./.prettierrc.yml + - name: Prettier Output + if: ${{ failure() }} + shell: bash + run: | + echo "The following files are not formatted:" + echo "${{steps.prettier-run.outputs.prettier_output}}" \ No newline at end of file diff --git a/README.md b/README.md index 72c4d71b6..486e522b0 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,3 @@ -<<<<<<< HEAD - -# atlas-mcp-server - -# TBD - # Atlas MCP Server PoC A Model Context Protocol server for interacting with MongoDB Atlas.