Skip to content

build(deps): bump gitmodules/TuviCore from 9daf54d to 0eb5fcd in the submodules group #629

build(deps): bump gitmodules/TuviCore from 9daf54d to 0eb5fcd in the submodules group

build(deps): bump gitmodules/TuviCore from 9daf54d to 0eb5fcd in the submodules group #629

Workflow file for this run

################################################################################
# #
# Copyright 2023 Eppie (https://eppie.io) #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #
# you may not use this file except in compliance with the License. #
# You may obtain a copy of the License at #
# #
# http://www.apache.org/licenses/LICENSE-2.0 #
# #
# Unless required by applicable law or agreed to in writing, software #
# distributed under the License is distributed on an "AS IS" BASIS, #
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
# See the License for the specific language governing permissions and #
# limitations under the License. #
# #
################################################################################
name: Build and Test
on:
push:
branches:
- main
- develop
- release/**
pull_request:
branches:
- main
- develop
- release/**
env:
project: src/Eppie.CLI/Eppie.CLI/Eppie.CLI.csproj
test-project: ${{ null }}
test-report-root: src/Eppie.CLI/TestResults
dotnet-version: 9.x
jobs:
coding-style:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
submodules: recursive
- name: Install dotnet
uses: actions/setup-dotnet@3951f0dfe7a07e2313ec93c75700083e2005cbab # v4.3.0
with:
dotnet-version: ${{ env.dotnet-version }}
- name: Check formatting
run: dotnet format ${{ env.project }} --verify-no-changes
build:
needs: [coding-style]
strategy:
matrix:
configuration: [Debug, Release]
os: [windows-latest, macos-latest, ubuntu-latest]
runs-on: ${{ matrix.os }}
env:
configuration: ${{ matrix.configuration }}
steps:
- name: Support longpaths
if: ${{ matrix.os == 'windows-latest'}}
run: git config --system core.longpaths true
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
submodules: recursive
- name: Install dotnet
uses: actions/setup-dotnet@3951f0dfe7a07e2313ec93c75700083e2005cbab # v4.3.0
with:
dotnet-version: ${{ env.dotnet-version }}
- name: Build
run: dotnet build ${{ env.project }} --configuration ${{ env.configuration }}
- name: Test
if: env.test-project != ''
run: dotnet test ${{ env.test-project }} --configuration ${{ env.configuration }} --collect:"XPlat Code Coverage" --results-directory="${{ env.test-report-root }}"
- name: Get branch name
if: ${{ env.test-project != '' && runner.os == 'Linux' }}
id: branch
run: |
branch=$(echo "$GITHUB_REF_NAME")
name=$([ -z $branch ] && echo "unknown" || echo "$branch" | sed -r 's/[\/]+/-/g')
echo "name=$name" >> $GITHUB_OUTPUT
- name: Generate test coverage badge
if: ${{ env.test-project != '' && runner.os == 'Linux' && env.gist-id != '' && env.gist-auth-token != '' }}
uses: finebits/github-actions/badges/coverlet-coverage-badge@4a126d80a11c5fdc83ce884d3d23dffb30bc4495 # v2.0.0
with:
label: "coverage"
report-root: "${{ env.test-report-root }}/**/"
report-filename: coverage.cobertura.xml
gist-filename-format: "${{ github.event.repository.name }}-${{ env.branch-name }}-{0}-test-coverage.json"
gist-id: ${{ env.gist-id }}
gist-auth-token: ${{ env.gist-auth-token }}
env:
gist-id: ${{ vars.BADGE_COVERLET_COVERAGE_GIST_ID }}
gist-auth-token: ${{ secrets.TOKEN_GITHUB_GIST }}
branch-name: ${{ steps.branch.outputs.name }}