Skip to content

Commit bed1999

Browse files
committed
Add reuse and check-formatting workflows
Adds adapted version of `reuse` and `check-formatting` workflows from the AtomVM repository. Signed-off-by: Winford <winford@object.stream>
1 parent 6783c02 commit bed1999

File tree

2 files changed

+54
-0
lines changed

2 files changed

+54
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#
2+
# Copyright 2022 Davide Bettio <davide@uninstall.it>
3+
#
4+
# SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
5+
#
6+
7+
name: "Check formatting"
8+
9+
on:
10+
push:
11+
paths:
12+
- '**/*.erl'
13+
pull_request:
14+
paths:
15+
- '**/*.erl'
16+
17+
concurrency:
18+
group: ${{ github.workflow }}-${{ github.ref != 'refs/heads/master' && github.ref || github.run_id }}
19+
cancel-in-progress: true
20+
21+
jobs:
22+
erlfmt-check:
23+
runs-on: ubuntu-24.04
24+
container: erlang:27
25+
steps:
26+
- uses: actions/checkout@v4
27+
28+
- name: "Check formatting with Erlang fmt"
29+
run: |
30+
cd ..
31+
git clone --depth 1 -b v1.1.0 https://github.com/WhatsApp/erlfmt.git
32+
cd erlfmt
33+
rebar3 as release escriptize
34+
cd ../atomvm_rebar3_plugin
35+
find . -name *.erl | xargs ../erlfmt/_build/release/bin/erlfmt -c

.github/workflows/reuse-lint.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# SPDX-FileCopyrightText: 2022 Free Software Foundation Europe e.V. <https://fsfe.org>
2+
#
3+
# SPDX-License-Identifier: CC0-1.0
4+
5+
name: REUSE Compliance Check
6+
7+
on: [push, pull_request]
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref != 'refs/heads/master' && github.ref || github.run_id }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
test:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: REUSE Compliance Check
19+
uses: fsfe/reuse-action@v1

0 commit comments

Comments
 (0)