diff --git a/.github/workflows/gofmt-check.yml b/.github/workflows/gofmt-check.yml new file mode 100644 index 0000000..fcaa5dd --- /dev/null +++ b/.github/workflows/gofmt-check.yml @@ -0,0 +1,25 @@ +name: Gofmt Check + +on: [push, pull_request] + +jobs: + gofmt-check: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: '1.23' + + - name: Run gofmt + run: | + unformatted=$(gofmt -l .) + if [ -n "$unformatted" ]; then + echo "Unformatted Go files found:" + echo "$unformatted" + exit 1 + fi diff --git a/.github/workflows/prettier-check.yml b/.github/workflows/prettier-check.yml new file mode 100644 index 0000000..8c41b4b --- /dev/null +++ b/.github/workflows/prettier-check.yml @@ -0,0 +1,23 @@ +name: Prettier Check + +on: [push, pull_request] + +jobs: + prettier-check: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: '22' + + - name: Install dependencies + run: npm ci + + - name: Run Prettier check + run: | + npx prettier --check "**/*.html"