From 98b4e5e82cfc51e1dcf183beaee82b6f3b394809 Mon Sep 17 00:00:00 2001 From: Dani Michel Date: Wed, 23 Oct 2024 11:42:19 +0200 Subject: [PATCH] Use Github actions to run tests --- .github/workflows/dotnet.yml | 27 +++++++++++++++++++++++++++ .travis.yml | 5 ----- build.sh | 16 ++++++++-------- 3 files changed, 35 insertions(+), 13 deletions(-) create mode 100644 .github/workflows/dotnet.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml new file mode 100644 index 0000000..3625f22 --- /dev/null +++ b/.github/workflows/dotnet.yml @@ -0,0 +1,27 @@ + +name: .NET build & test + +on: + push: + branches: [ "*" ] + pull_request: + branches: [ "*" ] + +jobs: + build: + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./Sources + steps: + - uses: actions/checkout@v3 + - name: Setup .NET + uses: actions/setup-dotnet@v3 + with: + dotnet-version: 6.0.x + - name: Restore dependencies + run: dotnet restore + - name: Test + run: dotnet test -c debug + - name: Build + run: dotnet build -c release diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 8ab0f11..0000000 --- a/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: csharp -mono: none -dotnet: 2.1.502 -before_script: cd Sources -script: dotnet restore && dotnet build && dotnet test Equ.Test/Equ.Test.csproj diff --git a/build.sh b/build.sh index f627773..5ee0f19 100755 --- a/build.sh +++ b/build.sh @@ -1,8 +1,8 @@ -#!/usr/bin/env bash - -pushd Sources - -dotnet restore && dotnet build -dotnet test EquTest/EquTest.csproj - -popd +#!/usr/bin/env bash + +pushd Sources + +dotnet restore && dotnet build +dotnet test + +popd