-
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (48 loc) · 1.44 KB
/
build.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
name: Build and Test
on:
pull_request:
types: [synchronize, opened, edited]
push:
branches: [main]
jobs:
build:
permissions:
id-token: write
checks: read
strategy:
matrix:
cfg: [Release, Debug]
os: [ubuntu, macos, windows]
version: ['6.x']
runs-on: ${{ matrix.os }}-latest
env:
DOTNET_NOLOGO: true
steps:
- name: Checkout Repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- name: Setup .NET Core
uses: actions/setup-dotnet@6bd8b7f7774af54e05809fcc5431931b3eb1ddee # v4
with:
dotnet-version: ${{ matrix.version }}
- name: Install Dependencies
run: dotnet restore
- name: Install Tools
run: dotnet tool restore
- name: Check Formatting
run: dotnet format --verify-no-changes
- name: Build Project
run: >-
dotnet build --nologo --no-restore
--configuration ${{ matrix.cfg }}
- name: Run Tests
working-directory: ${{github.workspace}}/Atmosphere.Tests
run: >-
dotnet test --nologo --no-restore
--configuration ${{ matrix.cfg }}
--logger GitHubActions
--property:CoverletOutput=${{github.workspace}}/coverage.opencover.xml
- name: Upload Coverage
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4
with:
files: ${{github.workspace}}/coverage.opencover.xml
use_oidc: true