Bump MSTest.TestAdapter from 3.1.1 to 3.2.1 #90
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: GitHubActionsBuilds | |
on: push | |
jobs: | |
generate_version_number: | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
outputs: | |
build_number: ${{ github.ref == 'refs/heads/master' && steps.buildnumber.outputs.build_number || 1 }} | |
steps: | |
- name: Generate build number | |
if: github.ref == 'refs/heads/master' | |
id: buildnumber | |
uses: onyxmueller/build-tag-number@v1 | |
with: | |
token: ${{secrets.github_token}} | |
build_docker: | |
needs: generate_version_number | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Login to Docker Hub | |
if: github.ref == 'refs/heads/master' | |
uses: docker/login-action@v3 | |
with: | |
username: devedse | |
password: ${{ secrets.DOCKERHUBTOKEN }} | |
- name: Set up QEMU | |
id: qemu | |
uses: docker/setup-qemu-action@v3 | |
with: | |
image: tonistiigi/binfmt:latest | |
platforms: all | |
- name: Available platforms | |
run: echo ${{ steps.qemu.outputs.platforms }} | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Builder instance name | |
run: echo ${{ steps.buildx.outputs.name }} | |
- name: Available platforms | |
run: echo ${{ steps.buildx.outputs.platforms }} | |
- name: Run Buildx | |
run: | | |
export VERSION=1.0.${{needs.generate_version_number.outputs.build_number}} | |
echo Version: $VERSION | |
docker buildx build -f DeveLanCacheUI_Frontend/Dockerfile --build-arg BUILD_VERSION=$VERSION --platform linux/arm64,linux/amd64 -t devedse/develancacheui_frontend:${{needs.generate_version_number.outputs.build_number}} -t devedse/develancacheui_frontend:latest ${{ github.ref == 'refs/heads/master' && '--push' || '' }} . | |
build_linux: | |
needs: generate_version_number | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: dotnet restore | |
run: dotnet restore DeveLanCacheUI_Frontend.sln | |
- name: dotnet build | |
run: dotnet build DeveLanCacheUI_Frontend.sln -c Release --no-restore /p:Version=1.0.${{needs.generate_version_number.outputs.build_number}} | |
- name: dotnet test | |
run: dotnet test DeveLanCacheUI_Frontend.sln -c Release --no-build --verbosity normal | |
build_windows: | |
needs: generate_version_number | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET Core @ Latest | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: '19' # The JDK version to make available on the path. | |
java-package: jdk # (jre, jdk, or jdk+fx) - defaults to jdk | |
architecture: x64 # (x64 or x86) - defaults to x64 | |
- name: Install tools | |
run: | | |
dotnet tool install --global dotnet-sonarscanner | |
dotnet tool install --global dotnet-reportgenerator-globaltool | |
- name: dotnet restore | |
run: dotnet restore DeveLanCacheUI_Frontend.sln | |
- name: SonarQube begin | |
run: dotnet-sonarscanner begin /k:"DeveLanCacheUI_Frontend" /o:"devedse-github" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.login=${{secrets.SONARQUBETOKEN}} /d:sonar.cs.opencover.reportsPaths=".\DeveLanCacheUI_Frontend.Tests\TestResults\*\coverage.opencover.xml" /d:sonar.coverage.exclusions="DeveLanCacheUI_Frontend.Tests/**/*.cs" | |
- name: dotnet build | |
run: dotnet build DeveLanCacheUI_Frontend.sln -c Release --no-restore /p:Version=1.0.${{needs.generate_version_number.outputs.build_number}} | |
- name: dotnet test | |
#run: dotnet test DeveLanCacheUI_Frontend.sln --verbosity normal --no-build -c Release /p:CollectCoverage=true /p:CoverletOutputFormat=\`"cobertura,opencover\`" /p:CoverletOutput=./TestResults/Coverage/ | |
run: dotnet test DeveLanCacheUI_Frontend.sln --verbosity normal --no-build -c Release --collect:"XPlat Code Coverage" -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=cobertura,opencover | |
- name: SonarQube end | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: dotnet-sonarscanner end /d:sonar.login=${{secrets.SONARQUBETOKEN}} | |
- name: Run CodeCov | |
uses: codecov/codecov-action@v3 | |
with: | |
directory: ./DeveLanCacheUI_Frontend.Tests/TestResults | |
fail_ci_if_error: true # optional (default = false) | |
verbose: true # optional (default = false) | |
# - uses: actions/upload-artifact@v3 | |
# with: | |
# name: DeveLanCacheUI_Frontend7z | |
# path: ./Scripts/Output/DeveLanCacheUI_Frontend.7z | |
# - uses: actions/upload-artifact@v3 | |
# with: | |
# name: DeveLanCacheUI_FrontendZip | |
# path: ./Scripts/Output/DeveLanCacheUI_Frontend.zip | |
# release_github: | |
# needs: [generate_version_number, build_windows, build_linux, build_docker] | |
# runs-on: ubuntu-latest | |
# if: github.ref == 'refs/heads/master' | |
# steps: | |
# - name: Download all artifacts | |
# uses: actions/download-artifact@v2 | |
# with: | |
# path: ./artifacts/ | |
# - name: Display structure of downloaded files | |
# run: | | |
# cd ./artifacts/ | |
# ls -R | |
# - name: Create Release | |
# id: create_release | |
# uses: actions/create-release@v1 | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | |
# with: | |
# tag_name: 1.0.${{needs.generate_version_number.outputs.build_number}} | |
# release_name: 1.0.${{needs.generate_version_number.outputs.build_number}} | |
# body: | | |
# ${{ github.event.head_commit.message }} | |
# draft: false | |
# prerelease: false | |
# - name: Release | |
# uses: softprops/action-gh-release@v1 | |
# with: | |
# tag_name: 1.0.${{needs.generate_version_number.outputs.build_number}} | |
# files: | | |
# ./artifacts/DeveLanCacheUI_Frontend7z/DeveLanCacheUI_Frontend.7z | |
# ./artifacts/DeveLanCacheUI_FrontendZip/DeveLanCacheUI_Frontend.zip | |
# ./artifacts/DeveLanCacheUI_FrontendNuGet/*.nupkg | |
# ./artifacts/DeveLanCacheUI_FrontendNuGet/*.snupkg | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# release_nuget: | |
# needs: [generate_version_number, build_windows, build_linux, build_docker, release_github] | |
# runs-on: ubuntu-latest | |
# if: github.ref == 'refs/heads/master' | |
# steps: | |
# - name: Download all artifacts | |
# uses: actions/download-artifact@v2 | |
# with: | |
# name: DeveLanCacheUI_FrontendNuGet | |
# path: ./artifacts/DeveLanCacheUI_FrontendNuGet/ | |
# - name: Push NuGet | |
# run: dotnet nuget push ./artifacts/DeveLanCacheUI_FrontendNuGet/DeveLanCacheUI_Frontend.1.0.${{needs.generate_version_number.outputs.build_number}}.nupkg -k ${{ secrets.NUGETTOKEN }} -s https://api.nuget.org/v3/index.json |