Skip to content

Commit

Permalink
Update GitHub actions
Browse files Browse the repository at this point in the history
  • Loading branch information
sschmid committed Jul 27, 2023
1 parent 7961b0e commit 544ff83
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
24 changes: 22 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Build

on: [ workflow_call, workflow_dispatch ]
on: [workflow_call, workflow_dispatch]

jobs:
build:
Expand All @@ -9,7 +9,7 @@ jobs:
- name: "Checkout"
uses: actions/checkout@v3
with:
submodules: 'recursive'
submodules: recursive

- name: "Setup dotnet"
uses: actions/setup-dotnet@v3
Expand All @@ -23,6 +23,9 @@ jobs:
-p:UnityEngine=/home/runner/work/Entitas/Entitas/unity/Unity-2021.3.0f1/UnityEngine.dll \
-c Release
- name: "Test"
run: dotnet test -c Release --no-build --collect:"XPlat Code Coverage"

- name: "Publish"
run: dotnet publish -c Release --no-build -p:UseAppHost=false -o dist/Assemblies

Expand All @@ -40,3 +43,20 @@ jobs:
with:
name: ${{ github.event.repository.name }} NuGet Packages
path: dist/NuGet

- name: "Generate coverage report"
run: |
dotnet tool install -g dotnet-reportgenerator-globaltool
reportgenerator "-assemblyfilters:-Entitas*.Tests*" "-reports:tests/**/TestResults/**/coverage.cobertura.xml" "-targetdir:coverage" "-reporttypes:Html;lcov"
- name: "Upload coverage report"
uses: actions/upload-artifact@v3
with:
name: ${{ github.event.repository.name }} Coverage Report
path: coverage

- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: "coverage/lcov.info"
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: CI

on:
push:
branches: [ main, develop ]
branches: [main]
pull_request:
branches: [ main, develop ]
branches: [main]

jobs:
build:
Expand Down

0 comments on commit 544ff83

Please sign in to comment.