Skip to content

Commit

Permalink
Cleanup GitHub Actions, upload build artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
skibitsky committed Dec 11, 2023
1 parent 32804cf commit f6db727
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 39 deletions.
6 changes: 2 additions & 4 deletions .github/actions/ci/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,15 @@ inputs:
runs:
using: "composite"
steps:
# Package buildss
- name: Run tests
if: inputs.type == 'unit-tests'
shell: bash
run: dotnet test --verbosity normal --filter Category=unit
run: dotnet test --verbosity minimal --filter Category=unit

# Integration tests
- name: Run integration tests
if: inputs.type == 'integration-tests'
shell: bash
env:
RELAY_ENDPOINT: ${{ inputs.relay-endpoint }}
PROJECT_ID: ${{ inputs.project-id }}
run: dotnet test --verbosity normal --filter Category=integration
run: dotnet test --verbosity minimal --filter Category=integration
20 changes: 16 additions & 4 deletions .github/workflows/dotnet_build.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: .NET Build & Test

on:
push:
branches: [ main, 2.0 ]

branches: [ main, '2.0' ]
pull_request:
jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -17,15 +17,27 @@ jobs:
uses: actions/setup-dotnet@v1
with:
dotnet-version: |
3.1.x
6.0.x
- name: Restore dependencies
run: dotnet restore
working-directory: ./

- name: Build
run: dotnet build --no-restore
working-directory: ./
- uses: ./.github/actions/ci

- name: Run tests
uses: ./.github/actions/ci
with:
type: ${{ matrix.test-type }}
project-id: ${{ secrets.PROJECT_ID }}

- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: build-artifacts
path: |
**/bin/**/*.dll
!**/Core Modules/**/bin/**/*.dll
!**/Tests/**/bin/**/*.dll
30 changes: 0 additions & 30 deletions .github/workflows/pull_request.yml

This file was deleted.

4 changes: 3 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,20 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: |
3.1.x
6.0.x
- name: Build
run: dotnet build -c Release
- uses: ./.github/actions/ci
with:
type: 'unit-tests'
project-id: ${{ secrets.PROJECT_ID }}

- name: Pack nugets
run: dotnet pack -c Release --no-build --output .
- name: Push to NuGet
Expand Down

0 comments on commit f6db727

Please sign in to comment.