emqx/.github/workflows/code_style_check.yaml

36 lines
793 B
YAML

name: Code style check
on: [pull_request]
jobs:
build:
strategy:
matrix:
otp:
- 24.2.1-1
elixir:
- 1.13.3
os:
- ubuntu20.04
runs-on: ubuntu-20.04
container: "ghcr.io/emqx/emqx-builder/5.0-10:${{ matrix.elixir}}-${{ matrix.otp }}-${{ matrix.os }}"
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1000
- 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