-
-
Notifications
You must be signed in to change notification settings - Fork 148
72 lines (71 loc) · 1.95 KB
/
ValidatePullRequest.yml
File metadata and controls
72 lines (71 loc) · 1.95 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
71
72
name: Validate Pull Request
on:
pull_request:
branches: [main,1.0.0]
jobs:
run_tests:
runs-on: ubuntu-latest
name: Run Tests
steps:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v3
- run: >
dotnet test --solution CSharpier.slnx
no_warnings:
runs-on: ubuntu-latest
name: No Warnings
steps:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v3
- run: >
dotnet build CSharpier.slnx -c release -p:TreatWarningsAsErrors=true
builds_playground:
runs-on: ubuntu-latest
name: Builds Playground
steps:
- uses: actions/checkout@v2
- run: >
docker build .
check_formatting:
runs-on: ubuntu-latest
name: Check Formatting
steps:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v3
- run: |
rm -r -f ./Tests/CSharpier.MsBuild.Test
dotnet tool restore
dotnet csharpier check .
cd ./Src/CSharpier.Rider
npm install
npm run prettier:check
cd ..
cd ./CSharpier.Playground/ClientApp
npm install
npm run prettier:check
check_todos:
runs-on: ubuntu-latest
name: Check TODOs
steps:
- uses: actions/checkout@v2
- name: Get branch name (pull request)
if: github.event_name == 'pull_request'
shell: bash
run: echo "BRANCH_NAME=$(echo ${GITHUB_HEAD_REF} | tr / -)" >> $GITHUB_ENV
- shell: pwsh
run: |
./.github/workflows/ValidatePullRequest_CheckTodos.ps1 -BranchName ${{ env.BRANCH_NAME }}
test_msbuild:
strategy:
matrix:
os: [ ubuntu-latest, windows-latest ]
runs-on: ${{ matrix.os }}
name: Test CSharpier.MSBuild
steps:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v3
- env:
GithubOS: ${{matrix.os}}
run: |
pwsh ./Tests/MsBuild/Run.ps1
echo blah