4
4
pull_request :
5
5
6
6
jobs :
7
- check :
8
- name : Check for file modification
9
- outputs :
10
- run_job : ${{ steps.check_files.outputs.run_job }}
7
+ build-sss-f :
11
8
runs-on : ubuntu-latest
12
9
steps :
13
10
- uses : actions/checkout@v2
11
+ - uses : actions/setup-dotnet@v1
14
12
with :
15
- fetch-depth : 2
16
- - name : Run checker
17
- id : check_files
18
- run : |
19
- echo "List modified files"
20
- git diff --name-only HEAD^ HEAD
21
- echo "Check paths of modified files"
22
- git diff --name-only HEAD^ HEAD >files.txt
23
-
24
- sssf=false
25
- sssfp=false
26
-
27
- while IFS= read -r file; do
28
- echo $file
29
- if [[ $file == src/SqlStreamStore.FSharp/* ]]; then
30
- sssf=true
31
- elif [[ $file == src/SqlStreamStore.FSharp.Postgres/* ]]; then
32
- sssfp=true
33
- fi
34
- done <files.txt
35
-
36
- rm -f files.txt
37
-
38
- if [ $sssf = true ] && [ $sssfp = true ]; then
39
- echo "::set-output name=run_jobs:all"
40
- elif [ $sssf = true ] && [ $sssfp = false ]; then
41
- echo "::set-output name=run_jobs:sssf"
42
- elif [ $sssf = false ] && [ $sssfp = true ]; then
43
- echo "::set-output name=run_jobs:sssfp"
44
- else
45
- echo "::set-output name=run_jobs:none"
46
- fi
47
-
48
- build-sss-f :
49
- needs : check
50
- if : ${{ needs.check.outputs.run_job }} == 'all' || ${{ needs.check.outputs.run_job }} == 'sssf'
51
- strategy :
52
- matrix :
53
- os : [ ubuntu-latest, macos-latest, windows-latest ]
54
- fail-fast : false
55
- runs-on : ${{ matrix.os }}
56
- name : Build on ${{ matrix.os }} using dotnet version ${{ matrix.dotnet }}
57
- steps :
58
- - uses : actions/checkout@v2
13
+ dotnet-version : ' 6.0.x'
14
+ - name : Restore
15
+ run : dotnet restore
59
16
- name : Build
60
- run : cd src/SqlStreamStore.FSharp; dotnet build --configuration Release
17
+ working-directory : src/SqlStreamStore.FSharp
18
+ run : dotnet build --no-restore --configuration Release
61
19
62
20
build-sss-f-postgres :
63
- needs : check
64
- if : ${{ needs.check.outputs.run_job }} == 'all' || ${{ needs.check.outputs.run_job }} == 'sssfp'
65
- strategy :
66
- matrix :
67
- os : [ ubuntu-latest, macos-latest, windows-latest ]
68
- fail-fast : false
69
- runs-on : ${{ matrix.os }}
70
- name : Build on ${{ matrix.os }} using dotnet version ${{ matrix.dotnet }}
21
+ runs-on : ubuntu-latest
71
22
steps :
72
23
- uses : actions/checkout@v2
24
+ - uses : actions/setup-dotnet@v1
25
+ with :
26
+ dotnet-version : ' 6.0.x'
27
+ - name : Restore
28
+ run : dotnet restore
73
29
- name : Build
74
- run : cd src/SqlStreamStore.FSharp.Postgres; dotnet build --configuration Release
75
-
76
- # Put back when you add tests
77
- # - name: Test
78
- # run: dotnet test --no-restore
30
+ working-directory : src/SqlStreamStore.FSharp.Postgres
31
+ run : dotnet build --no-restore --configuration Release
0 commit comments