Skip to content

Commit

Permalink
updated ci-cd config for Github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
bezzad committed Aug 19, 2024
1 parent a537300 commit 6e88611
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 52 deletions.
49 changes: 21 additions & 28 deletions .github/workflows/dotnet-ubuntu.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,28 @@
name: Ubuntu x64

on: [push]
on: [ push ]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

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

- name: Install Downloader Dependencies
run: dotnet restore ./src/Downloader/Downloader.csproj

- name: Build Downloader Project
run: dotnet build ./src/Downloader/Downloader.csproj

- name: Install Downloader.DummyHttpServer Dependencies
run: dotnet restore ./src/Downloader.DummyHttpServer/Downloader.DummyHttpServer.csproj

- name: Build Downloader.DummyHttpServer Project
run: dotnet build ./src/Downloader.DummyHttpServer/Downloader.DummyHttpServer.csproj

- name: Install Downloader.Test Dependencies
run: dotnet restore ./src/Downloader.Test/Downloader.Test.csproj

- name: Build Downloader.Test Project
run: dotnet build ./src/Downloader.Test/Downloader.Test.csproj

- name: Test
run: dotnet test ./src/Downloader.Test/Downloader.Test.csproj --no-build --verbosity detailed
- name: Checkout code
- uses: actions/checkout@v3

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

- name: Build solution
run: dotnet build -c Release --verbosity minimal

- name: Run tests
run: dotnet test -c Release --verbosity normal --no-build --no-restore

- name: Publish
run: dotnet publish -c Release --no-build --no-restore
41 changes: 17 additions & 24 deletions .github/workflows/dotnet-windows.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,28 @@
name: Windows x64

on: [push]
on: [ push ]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3

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

- name: Install Downloader Dependencies
run: dotnet restore ./src/Downloader/Downloader.csproj

- name: Build Downloader Project
run: dotnet build ./src/Downloader/Downloader.csproj

- name: Install Downloader.DummyHttpServer Dependencies
run: dotnet restore ./src/Downloader.DummyHttpServer/Downloader.DummyHttpServer.csproj
- name: Checkout code
- uses: actions/checkout@v3

- name: Build Downloader.DummyHttpServer Project
run: dotnet build ./src/Downloader.DummyHttpServer/Downloader.DummyHttpServer.csproj
- name: Setup .NET Core 8.0
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x

- name: Install Downloader.Test Dependencies
run: dotnet restore ./src/Downloader.Test/Downloader.Test.csproj
- name: Build solution
run: dotnet build -c Release --verbosity minimal

- name: Build Downloader.Test Project
run: dotnet build ./src/Downloader.Test/Downloader.Test.csproj
- name: Run tests
run: dotnet test -c Release --verbosity normal --no-build --no-restore

- name: Test
run: dotnet test ./src/Downloader.Test/Downloader.Test.csproj --no-build --verbosity detailed
- name: Publish
run: dotnet publish -c Release --no-build --no-restore

0 comments on commit 6e88611

Please sign in to comment.