-
Notifications
You must be signed in to change notification settings - Fork 2
48 lines (41 loc) · 1.06 KB
/
crystal-ameba.yml
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
name: Crystal Ameba
on:
push:
branches:
- main
paths:
- "**/*.cr"
pull_request:
branches:
- main
paths:
- "**/*.cr"
jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
ameba-version: [v1.6.4]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Crystal
uses: crystal-lang/install-crystal@v1
- name: Cache Ameba binary
id: cache-ameba
uses: actions/cache@v3
with:
path: bin/ameba
key: ${{ runner.os }}-ameba-${{ matrix.ameba-version }}
- name: Build Ameba
if: steps.cache-ameba.outputs.cache-hit != 'true'
run: |
git clone --branch ${{ matrix.ameba-version }} --single-branch https://github.com/crystal-ameba/ameba.git
cd ameba
make bin/ameba CRFLAGS='-Dpreview_mt --release --no-debug'
mkdir -p ../bin
mv bin/ameba ../bin/ameba
cd ..
rm -rf ameba
- name: Run Ameba Linter
run: bin/ameba -c .ameba.yml