|
1 | | -name: pr_validation |
2 | | - |
3 | | -on: |
4 | | - push: |
5 | | - branches: |
6 | | - - master |
7 | | - - dev |
8 | | - - main |
9 | | - pull_request: |
10 | | - branches: |
11 | | - - master |
12 | | - - dev |
13 | | - - main |
14 | | - |
15 | | -jobs: |
16 | | - test: |
17 | | - name: Test-${{matrix.os}} |
18 | | - runs-on: ${{matrix.os}} |
19 | | - |
20 | | - strategy: |
21 | | - matrix: |
22 | | - os: [ubuntu-latest] |
23 | | - |
24 | | - steps: |
25 | | - - name: "Checkout" |
26 | | - uses: actions/checkout@v5.0.0 |
27 | | - with: |
28 | | - lfs: true |
29 | | - fetch-depth: 0 |
30 | | - |
31 | | - - name: "Install .NET SDK" |
32 | | - uses: actions/setup-dotnet@v4.3.1 |
33 | | - with: |
34 | | - global-json-file: "./global.json" |
35 | | - |
36 | | - - name: "Restore .NET tools" |
37 | | - run: dotnet tool restore |
38 | | - |
39 | | - - name: "Update release notes" |
40 | | - shell: pwsh |
41 | | - run: | |
42 | | - ./build.ps1 |
43 | | -
|
44 | | - - name: "dotnet build" |
45 | | - run: dotnet build -c Release |
46 | | - |
47 | | - # .NET Framework tests can't run reliably on Linux, so we only do .NET 8 |
48 | | - |
49 | | - - name: "dotnet test" |
50 | | - shell: bash |
51 | | - run: dotnet test -c Release |
52 | | - |
53 | | - docker-build: |
54 | | - name: Docker Build Validation |
55 | | - runs-on: ubuntu-latest |
56 | | - |
57 | | - steps: |
58 | | - - name: "Checkout" |
59 | | - uses: actions/checkout@v5.0.0 |
60 | | - with: |
61 | | - lfs: true |
62 | | - fetch-depth: 0 |
63 | | - |
64 | | - - name: "Install .NET SDK" |
65 | | - uses: actions/setup-dotnet@v4.3.1 |
66 | | - with: |
67 | | - global-json-file: "./global.json" |
68 | | - |
69 | | - - name: "Build Docker image" |
70 | | - run: | |
71 | | - dotnet publish src/MSSQLMCPServer/MSSQLMCPServer.csproj \ |
72 | | - --os linux \ |
73 | | - --arch x64 \ |
74 | | - -c Release \ |
75 | | - /t:PublishContainer |
76 | | -
|
77 | | - - name: "Verify Docker image exists" |
78 | | - run: docker images | grep mssql-mcp |
| 1 | +name: pr_validation |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - master |
| 7 | + - dev |
| 8 | + - main |
| 9 | + pull_request: |
| 10 | + branches: |
| 11 | + - master |
| 12 | + - dev |
| 13 | + - main |
| 14 | + |
| 15 | +jobs: |
| 16 | + test: |
| 17 | + name: Test-${{matrix.os}} |
| 18 | + runs-on: ${{matrix.os}} |
| 19 | + |
| 20 | + strategy: |
| 21 | + matrix: |
| 22 | + os: [ubuntu-latest] |
| 23 | + |
| 24 | + steps: |
| 25 | + - name: "Checkout" |
| 26 | + uses: actions/checkout@v5.0.0 |
| 27 | + with: |
| 28 | + lfs: true |
| 29 | + fetch-depth: 0 |
| 30 | + |
| 31 | + - name: "Install .NET SDK" |
| 32 | + uses: actions/setup-dotnet@v4.3.1 |
| 33 | + with: |
| 34 | + global-json-file: "./global.json" |
| 35 | + |
| 36 | + - name: "Restore .NET tools" |
| 37 | + run: dotnet tool restore |
| 38 | + |
| 39 | + - name: "Update release notes" |
| 40 | + shell: pwsh |
| 41 | + run: | |
| 42 | + ./build.ps1 |
| 43 | +
|
| 44 | + - name: "dotnet build" |
| 45 | + run: dotnet build -c Release |
| 46 | + |
| 47 | + # .NET Framework tests can't run reliably on Linux, so we only do .NET 8 |
| 48 | + |
| 49 | + - name: "dotnet test" |
| 50 | + shell: bash |
| 51 | + run: dotnet test -c Release |
| 52 | + |
| 53 | + docker-build: |
| 54 | + name: Docker Build Validation |
| 55 | + runs-on: ubuntu-latest |
| 56 | + |
| 57 | + steps: |
| 58 | + - name: "Checkout" |
| 59 | + uses: actions/checkout@v5.0.0 |
| 60 | + with: |
| 61 | + lfs: true |
| 62 | + fetch-depth: 0 |
| 63 | + |
| 64 | + - name: "Install .NET SDK" |
| 65 | + uses: actions/setup-dotnet@v4.3.1 |
| 66 | + with: |
| 67 | + global-json-file: "./global.json" |
| 68 | + |
| 69 | + - name: "Build Docker image" |
| 70 | + run: | |
| 71 | + dotnet publish src/MSSQLMCPServer/MSSQLMCPServer.csproj \ |
| 72 | + --os linux \ |
| 73 | + --arch x64 \ |
| 74 | + -c Release \ |
| 75 | + /t:PublishContainer |
| 76 | +
|
| 77 | + - name: "Verify Docker image exists" |
| 78 | + run: docker images | grep mssql-mcp |
0 commit comments