30 lines
802 B
YAML
30 lines
802 B
YAML
name: Code style check
|
|
|
|
on: [pull_request]
|
|
|
|
jobs:
|
|
code_style_check:
|
|
runs-on: ubuntu-20.04
|
|
container: "ghcr.io/emqx/emqx-builder/5.0-26:1.13.4-25.1.2-2-ubuntu20.04"
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 1000
|
|
- name: Work around https://github.com/actions/checkout/issues/766
|
|
run: |
|
|
git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
|
- name: Check line-break at EOF
|
|
run: |
|
|
./scripts/check-nl-at-eof.sh
|
|
- name: Check Elixir code formatting
|
|
run: |
|
|
mix format --check-formatted
|
|
|
|
- name: Check Erlang code formatting
|
|
run: |
|
|
./scripts/check-format.sh
|
|
|
|
- name: Run elvis check
|
|
run: |
|
|
./scripts/elvis-check.sh $GITHUB_BASE_REF
|