Skip to content

Commit

Permalink
feat: add build task on push
Browse files Browse the repository at this point in the history
  • Loading branch information
Phliipp Jenni committed Jan 13, 2024
1 parent 20ae6ff commit c3c0893
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 5 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/run-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net

name: Run Cypress Tests

on:
push:
branches-ignore: ["agnular/*"]
pull_request:
branches: ["agnular/*"]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Get Source
uses: actions/checkout@v3

- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 3.1.x

- name: Build
run: dotnet run --project build/Build.csproj --target=build
4 changes: 1 addition & 3 deletions .github/workflows/run-cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@
name: Run Cypress Tests

on:
push:
branches: ["ng16/*"]
pull_request:
branches: ["agnular/*"]

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

steps:
Expand Down
28 changes: 28 additions & 0 deletions build/pipelines/BuildBuild.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using Build.context;
using Build.tasks;
using Cake.Core.Diagnostics;
using Cake.Frosting;

namespace Build.pipelines
{
/// <summary>
/// Build Only Pipeline
/// </summary>
[TaskName("build")]
[TaskDescription("Build Task without publishing")]
[IsDependentOn(typeof(NpmBuild))]
public class BuildBuild : FrostingTask<BuildContext>
{
/// <summary>
/// Main Task
/// </summary>
/// <param name="context"></param>

public override void Run(BuildContext context)
{
base.Run(context);

context.Log.Information("Task done");
}
}
}
3 changes: 1 addition & 2 deletions build/pipelines/DefaultBuild.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Build.context;
using Build.tasks;
using Cake.Core.Diagnostics;
using Cake.Frosting;

Expand All @@ -10,7 +9,7 @@ namespace Build.pipelines
/// </summary>
[TaskName("default")]
[TaskDescription("Default Task without publishing")]
[IsDependentOn(typeof(NpmBuild))]
[IsDependentOn(typeof(BuildBuild))]
public class DefaultBuild : FrostingTask<BuildContext>
{
/// <summary>
Expand Down

0 comments on commit c3c0893

Please sign in to comment.