Skip to content

Bump Microsoft.AspNetCore.TestHost from 8.0.10 to 8.0.11 #47

Bump Microsoft.AspNetCore.TestHost from 8.0.10 to 8.0.11

Bump Microsoft.AspNetCore.TestHost from 8.0.10 to 8.0.11 #47

Workflow file for this run

name: "1 - Build and Test C# Code"
on:
workflow_dispatch:
pull_request:
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_NOLOGO: true
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Tune GitHub-hosted runner network
uses: smorimoto/tune-github-hosted-runner-network@v1
- uses: actions/checkout@v4
- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: "6.0.x"
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Tune GitHub-hosted runner network
uses: smorimoto/tune-github-hosted-runner-network@v1
- uses: actions/checkout@v4
- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: "6.0.x"
- name: Install dependencies
run: dotnet restore
- name: Test
run: dotnet test
release-reqs-check:
name: Release requirements check
runs-on: ubuntu-latest
steps:
- name: Tune GitHub-hosted runner network
uses: smorimoto/tune-github-hosted-runner-network@v1
- uses: actions/checkout@v4
- name: Get project version from `main`
id: proj_version_main
run: |
git fetch origin main:main
PROJ_VERSION_MAIN=$(git show main:src/Styra.Opa.AspNetCore/Styra.Opa.AspNetCore.csproj | grep -Eo '<Version>.*</Version>' | sed -E 's/<\/?Version>//g')
echo "PROJ_VERSION_MAIN=$PROJ_VERSION_MAIN" >> $GITHUB_ENV
- name: Get current version on this PR
id: proj_version_pr
run: |
PROJ_VERSION_PR=$(git show src/Styra.Opa.AspNetCore/Styra.Opa.AspNetCore.csproj | grep -Eo '<Version>.*</Version>' | sed -E 's/<\/?Version>//g')
echo "PROJ_VERSION_PR=$PROJ_VERSION_PR" >> $GITHUB_ENV
- name: Check for diff for project file changes.
run: |
if [ "$PROJ_VERSION_MAIN" != "$PROJ_VERSION_PR" ]; then
echo "Version changed from $PROJ_VERSION_MAIN to $PROJ_VERSION_PR"
echo "VERSION_CHANGED=true" >> $GITHUB_ENV
else
echo "Version unchanged"
echo "VERSION_CHANGED=false" >> $GITHUB_ENV
fi
- name: Check for other release-required files.
if: env.VERSION_CHANGED == 'true'
run: |
# Check for updated CHANGELOG.
if ! grep -q "^## $PROJ_VERSION_PR" CHANGELOG.md; then
echo "Error: Version $PROJ_VERSION_PR not found in CHANGELOG.md"
exit 1
fi