-
Notifications
You must be signed in to change notification settings - Fork 31
51 lines (42 loc) · 1.18 KB
/
Copy pathfsharp.yml
File metadata and controls
51 lines (42 loc) · 1.18 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
name: F# Checks
on:
workflow_dispatch:
push:
branches: ["main"]
paths:
- '**/*.fs'
- '**/*.fsproj'
- 'MacUtilGUI/**'
pull_request:
branches: ["main"]
paths:
- '**/*.fs'
- '**/*.fsproj'
- 'MacUtilGUI/**'
jobs:
lints:
name: F# Build and Format Check
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v5
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'
- name: Cache .NET packages
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: ${{ runner.os }}-nuget-
- name: Restore dependencies
run: dotnet restore MacUtilGUI/MacUtilGUI.fsproj
- name: Install Fantomas
run: |
dotnet tool install -g fantomas
echo "$HOME/.dotnet/tools" >> $GITHUB_PATH
- name: Build project
run: dotnet build MacUtilGUI/MacUtilGUI.fsproj --configuration Release --no-restore
- name: Check F# formatting
run: fantomas --check MacUtilGUI/