Skip to content

BOB-206 ParallelTestFrameWork для UI приложений [Under construction] #33

BOB-206 ParallelTestFrameWork для UI приложений [Under construction]

BOB-206 ParallelTestFrameWork для UI приложений [Under construction] #33

Workflow file for this run

name: CI
on:
push:
branches:
- main
- feature/*
tags:
- '*'
pull_request:
branches:
- main
- feature/*
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.x'
- name: Initialize .NET tool manifest
run: |
dotnet new tool-manifest || true
- name: Install minver-cli locally
run: dotnet tool install minver-cli --version 5.0.0
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Run tests
run: dotnet test --no-build --verbosity normal
- name: Get MinVer version
id: get_version
run: |
MINVER_VERSION=$(dotnet minver)
echo "MINVER_VERSION=${MINVER_VERSION}" >> $GITHUB_ENV
- name: Get latest tag
id: get_tag
run: |
TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "")
echo "TAG=${TAG}" >> $GITHUB_ENV
- name: Determine version
id: determine_version
run: |
if [ "${GITHUB_REF}" == "refs/heads/main" ]; then
VERSION=${{ env.TAG }}
else
VERSION=${{ env.MINVER_VERSION }}
fi
echo "VERSION=${VERSION}" >> $GITHUB_ENV
- name: Pack and Push
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')
run: |
dotnet pack -c Release /p:Version=${{ env.VERSION }}
dotnet nuget push **/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }}