forked from atomvm/atomvm_examples
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (50 loc) · 1.3 KB
/
Copy pathcheck-formatting.yaml
File metadata and controls
55 lines (50 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#
# Copyright 2022 Davide Bettio <davide@uninstall.it>
#
# SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
#
name: "Check formatting"
on:
push:
paths:
- ".github/workflows/**"
- "**/*.ex"
- "**/*.exs"
- "**/*.erl"
- "**/*.hrl"
- "**/*.src"
- "**/rebar.config"
pull_request:
paths:
- ".github/workflows/**"
- "**/*.ex"
- "**/*.exs"
- "**/*.erl"
- "**/*.hrl"
- "**/*.src"
- "**/rebar.config"
concurrency:
group: ${{ github.workflow }}-${{ github.ref != 'refs/heads/main' && github.ref || github.run_id }}
cancel-in-progress: true
jobs:
erlfmt-check:
runs-on: ubuntu-24.04
container: erlang:28
steps:
- uses: actions/checkout@v6
- name: "Check formatting with Erlang fmt"
run: |
cd ..
git clone --depth 1 -b v1.7.0 https://github.com/WhatsApp/erlfmt.git
cd erlfmt
rebar3 as release escriptize
cd ../atomvm_examples
find . -name *.erl | xargs ../erlfmt/_build/release/bin/erlfmt -c
mix-format-check:
runs-on: ubuntu-24.04
container: elixir:1.17.1
steps:
- uses: actions/checkout@v6
- name: "Check formatting with Elixir mix format"
run: |
mix format --check-formatted "**/*.{ex,exs}"