-
Notifications
You must be signed in to change notification settings - Fork 3
42 lines (35 loc) · 1.06 KB
/
lint.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
name: Lint
on:
push:
branches:
- '**'
pull_request:
branches:
- '**'
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Mint
run: |
git clone https://github.com/yonaskolb/Mint.git
cd Mint
swift build -c release
mkdir -p "$GITHUB_WORKSPACE/Mint/.mint/bin"
cp .build/release/mint "$GITHUB_WORKSPACE/Mint/.mint/bin/"
echo "$GITHUB_WORKSPACE/Mint/.mint/bin" >> $GITHUB_PATH
- name: Cache Mint packages
uses: actions/cache@v4
with:
path: .mint
key: ${{ runner.os }}-mint-${{ hashFiles('**/Mintfile') }}
restore-keys: |
${{ runner.os }}-mint-
- name: Run Linting
run: Scripts/soundness/lint.sh
env:
LINT_MODE: ${{ (github.event_name == 'pull_request' && github.base_ref == 'main') || (github.event_name == 'push' && github.ref == 'refs/heads/main') && 'STRICT' || '' }}
permissions:
contents: read