Skip to content

Commit

Permalink
Fix MegaLinter and Coverage setup
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixS90 committed Nov 10, 2023
1 parent afbd2a6 commit 192c3dd
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 17 deletions.
1 change: 0 additions & 1 deletion .github/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,3 @@ component_management:
- "czishrink/"
comment:
layout: "header, diff, flags, components" # show component info in the PR comment

9 changes: 5 additions & 4 deletions .github/workflows/czicompress_cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ jobs:
}
exclude:
# From https://github.com/actions/runner/issues/1512
- build: debug
config: { name: ubuntu-package-off, os: ubuntu-20.04, platform: x64-linux, package: OFF, path-cache: '/usr/local/share/vcpkg/installed', path-toolchain: '/usr/local/share/vcpkg/scripts/buildsystems/vcpkg.cmake', os-id: 'linux',}
- build: Debug
config: {name: ubuntu-package-off, os: ubuntu-20.04, platform: x64-linux, package: OFF, path-cache: '/usr/local/share/vcpkg/installed', path-toolchain: '/usr/local/share/vcpkg/scripts/buildsystems/vcpkg.cmake', os-id: 'linux'}
steps:

- name: Checkout the source codes.
Expand All @@ -75,9 +75,10 @@ jobs:
# Coverage collection based on https://about.codecov.io/blog/how-to-set-up-codecov-with-c-plus-plus-and-github-actions/
- name: Prepare Coverage
if: ${{ (matrix.config.os == 'windows-latest') && (matrix.build == 'Debug') }}
shell: pwsh
run: |
choco install OpenCppCoverage -y
echo "C:\Program Files\OpenCppCoverage" >> $env:GITHUB_PATH
choco install OpenCppCoverage -y
echo "C:\Program Files\OpenCppCoverage" >> $env:GITHUB_PATH
- name: Get Coverage
if: ${{ (matrix.config.os == 'windows-latest') && (matrix.build == 'Debug') }}
Expand Down
23 changes: 13 additions & 10 deletions .github/workflows/czishrink_dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,26 @@ jobs:
defaults:
run:
working-directory: czishrink
name: ${{matrix.config.name}}
name: ${{matrix.config.os}}-${{matrix.build}}
runs-on: ${{matrix.config.os}}

strategy:
fail-fast: false
matrix:
build: [Release, Debug]
config:
- {
name: windows,
os: windows-latest,
osfamily: win,
}
- {
name: ubuntu,
os: ubuntu-latest,
osfamily: linux,
}
exclude:
# From https://github.com/actions/runner/issues/1512
- build: Debug
config: {os: windows-latest, osfamily: win}

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -69,12 +72,12 @@ jobs:
run: dotnet restore

- name: Build
run: dotnet build --no-restore -c Debug
run: dotnet build --no-restore -c ${{ matrix.build }}

- name: Test
run: >
dotnet test
-c Debug
-c ${{ matrix.build }}
--no-build
--verbosity normal
--logger trx
Expand All @@ -87,7 +90,7 @@ jobs:
-p:Exclude='[netczicompress]netczicompress.Views.*'
- name: Upload coverage reports for czishrink to Codecov
if: matrix.config.name == 'ubuntu'
if: ${{ (matrix.config.os == 'ubuntu-latest') && (matrix.build == 'Debug') }}
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true
Expand All @@ -98,16 +101,16 @@ jobs:
- name: Upload dotnet test results
uses: actions/upload-artifact@v3
with:
name: dotnet-results-${{ matrix.config.name }}
name: dotnet-results-${{ matrix.config.os }}
path: TestResults
# Use always() to also publish test results when there are test failures
if: ${{ always() }}

- name: Publish
if: github.event_name == 'push'
if: ${{ (github.event_name == 'push') && (matrix.build == Release) }}
run: >
dotnet publish netczicompress.Desktop/netczicompress.Desktop.csproj
-c Release
-c ${{ matrix.build }}
-a x64
--self-contained
-p:PublishSingleFile=true
Expand All @@ -117,7 +120,7 @@ jobs:
- name: Upload published binaries
uses: actions/upload-artifact@v3
if: github.event_name == 'push'
if: ${{ (github.event_name == 'push') && (matrix.build == Release) }}
with:
name: CziShrink_${{ steps.getversion.outputs.version }}_${{ matrix.config.osfamily}}-x64
path: publish
3 changes: 1 addition & 2 deletions czishrink/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ An open source and cross-platform GUI for [CziCompress](https://github.com/ZEISS
## Table of contents

- [Overview](#overview)
- [Download](#download)
- [System Requirements](#system-requirements)
- [Theme Support](#theme-support)
- [I/O](#io)
Expand All @@ -18,7 +17,7 @@ An open source and cross-platform GUI for [CziCompress](https://github.com/ZEISS
- [FAQ](#faq)
- [Known Issues](#known-issues)
- [Potential Future Enhancements](#potential-future-enhancements)
- [Feedback](#feedback)
- [Contributing](#contributing)

## Overview

Expand Down

0 comments on commit 192c3dd

Please sign in to comment.