Skip to content

Commit

Permalink
add build action and tests project
Browse files Browse the repository at this point in the history
  • Loading branch information
rodnyjoseph200 committed Jan 22, 2025
1 parent 71e9118 commit e8cbe67
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build

on:
# Pull requests targeting main
pull_request:
branches: [ main ]

# opened: when a PR is created
# reopened: when a PR is reopened
# synchronize: when commits are pushed to an open PR
types: [opened, reopened, synchronize]

# Manually triggered
workflow_dispatch:

jobs:
build-and-test:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.x'

- name: Restore
run: dotnet restore

- name: Install Format Tool
run: dotnet tool install -g dotnet-format

- name: Check Format
run: dotnet format --verify-no-changes --verbosity diagnostic

- name: Build
run: dotnet build --no-restore -c Release --warnAsError

- name: Tests
run: dotnet test --no-build --no-restore -c Release tests/Xes.UnitTests/Xes.Tests.csproj
9 changes: 9 additions & 0 deletions tests/Xes.Tests/Xes.Tests.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>

0 comments on commit e8cbe67

Please sign in to comment.