-
Notifications
You must be signed in to change notification settings - Fork 161
70 lines (60 loc) · 1.63 KB
/
pull-requests.yml
File metadata and controls
70 lines (60 loc) · 1.63 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Build and Test PR
on:
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
id-token: write
security-events: write
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- name: Cache .NET SDK
uses: actions/cache@v5
with:
path: ~/.dotnet
key: ${{ runner.os }}-dotnet-sdk-${{ hashFiles('global.json') }}
restore-keys: |
${{ runner.os }}-dotnet-sdk-
- name: Cache NuGet packages
uses: actions/cache@v5
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('Directory.Packages.props', 'global.json', '.config/dotnet-tools.json') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Setup .NET Core
uses: actions/setup-dotnet@v5
- name: Run CI
run: dotnet fsi build.fsx
- name: Upload test results
uses: actions/upload-artifact@v7.0.1
if: failure()
with:
name: test-results-${{ matrix.os }}
path: TestResults/
retention-days: 7
- name: Analyze Solution
if: matrix.os == 'ubuntu-latest'
run: dotnet msbuild /t:AnalyzeSolution
continue-on-error: true
- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v4
if: matrix.os == 'ubuntu-latest'
with:
sarif_file: ./analysis.sarif
ci:
runs-on: ubuntu-latest
needs: build
steps:
- run: echo "All builds passed"