-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (52 loc) · 1.42 KB
/
build-test.yml
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
name: Build & Test
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
name: Build & Test Project
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: |
dotnet restore src/FloppyBot.sln
- name: Build
run: dotnet build --no-restore src/FloppyBot.sln
- name: Test
uses: zyborg/dotnet-tests-report@v1
with:
project_path: src/FloppyBot.sln
report_name: floppybot_v2_tests
report_title: FloppyBot v2 Tests
github_token: ${{ secrets.GITHUB_TOKEN }}
code-style:
name: Check Code Style
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: |
dotnet restore src/FloppyBot.sln
dotnet tool restore
- name: Check Code Format
run: |
dotnet csharpier --check src/
- name: Check Code Style
run: |
dotnet format style --verify-no-changes src/
- name: Run Format Analyzer
run: |
dotnet format analyzers --verify-no-changes src/