Skip to content

Commit

Permalink
add CI/CD and lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Ran Isenberg committed Sep 29, 2024
1 parent a211dcf commit fed0b16
Show file tree
Hide file tree
Showing 6 changed files with 733 additions and 2 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/comment_issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Comment when opened

permissions:
issues: write
checks: read
contents: read

on:
issues:
types:
- opened
jobs:
comment:
runs-on: ubuntu-latest
steps:
- run: gh issue comment $ISSUE --body "Thank you for opening this issue, we'll review it ASAP."
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ISSUE: ${{ github.event.issue.html_url }}
40 changes: 40 additions & 0 deletions .github/workflows/pr-serverless-blueprint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: PR - Serverless Blueprint CI/CD

permissions:
contents: read

env:
NODE_VERSION: "20"

on:
workflow_dispatch:

pull_request:
branches: [main]

jobs:
quality_standards:
runs-on: ubuntu-latest
steps:
- run: |
echo "🐧 This job is now running on a ${{ env.OS_NAME }} ${{env.OS_ARCH}} server hosted by GitHub!" >> $GITHUB_STEP_SUMMARY
echo "🔎 The name of your branch is ${{ env.BRANCH_NAME }} and your repository is ${{ env.REPO_NAME }}." >> $GITHUB_STEP_SUMMARY
env:
EVENT_NAME: ${{ github.event_name}}
OS_NAME: ${{ runner.os }}
OS_ARCH: ${{runner.arch }}
BRANCH_NAME: ${{ github.ref }}
REPO_NAME: ${{ github.repository }}
- name: Check out repository code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Set up Node
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: ${{ env.NODE_VERSION }}
cache: "npm"
- name: Install dependencies
run: make dev
- name: Formatting and Linting
run: make lint
4 changes: 2 additions & 2 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ MD040: true
# MD041/first-line-heading/first-line-h1 - First line in a file should be a top-level heading
MD041:
# Heading level
level: 2
level: 1
# RegExp for matching title in front matter
front_matter_title: "^\\s*title\\s*[:=]"

Expand All @@ -201,7 +201,7 @@ MD044:
html_elements: true

# MD045/no-alt-text - Images should have alternate text (alt text)
MD045: true
MD045: false

# MD046/code-block-style - Code block style
# Material theme tabbed content feature use indented and simple use fenced; can't support both
Expand Down
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.PHONY: dev lint update-deps


lint:
npx markdownlint -c .markdownlint.yaml README.md

update-deps:
npm i --package-lock-only
Loading

0 comments on commit fed0b16

Please sign in to comment.