Skip to content

Resolves #51 - unused config properties no longer needlessly mandatory #6

Resolves #51 - unused config properties no longer needlessly mandatory

Resolves #51 - unused config properties no longer needlessly mandatory #6

Workflow file for this run

name: .NET CI
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
# Summary:
#
# * Installs and configures the environment
# * Runs all .NET and JS tests
# * In Debug configuration (.NET tests)
# * WebDriver-based tests use a locally-running Chrome browser ONLY
# * Packages test results as build artifacts
# * Builds & packs the solution in Release configuration
# * Uploads the Release config packages as build artifacts
build_test_and_pack:
name: Build, test & package
runs-on: ubuntu-24.04
timeout-minutes: 30
env:
VersionSuffix: ci.${{ github.run_number }}
Configuration: Debug
DotnetVersion: 8.0.x
DISPLAY: :99
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
# Install build dependencies
- name: Add .NET global tools location to PATH
run: echo "$HOME/.dotnet/tools" >> "$GITHUB_PATH"
- name: Install .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DotnetVersion }}
- name: Install DocFX
run: dotnet tool install --global docfx
# See https://chromium.googlesource.com/chromium/src/+/main/docs/security/apparmor-userns-restrictions.md
- name: Disable AppArmor restrictions so Chrome may run
run: echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
- name: Start an Xvfb display so Chrome may run
run: Xvfb -ac $DISPLAY -screen 0 1280x1024x16 &
# Environment setup pre-build
- name: Restore .NET packages
run: dotnet restore
# Build and test the solution
- name: Build the solution
run: dotnet build -c ${{ env.Configuration }}
- name: Run .NET tests
id: dotnet_tests
run: dotnet test
continue-on-error: true
# Post-test tasks (artifacts, overall status)
- name: Gracefully stop Xvfb
run: killall Xvfb
continue-on-error: true
- name: Upload .NET test results artifacts
uses: actions/upload-artifact@v4
with:
name: NUnit test results
path: Tests/*.Tests/**/TestResults.xml
- name: Fail the build if any test failures
if: steps.dotnet_tests.outcome == 'failure'
run: |
echo "Failing the build due to test failures"
exit 1
# Build the apps in release mode and publish artifacts
- name: Clean the solution ahead of building in release config
run: dotnet clean
- name: Build, in release configuration
run: dotnet pack -p:VersionSuffix=$VersionSuffix -o packages
- name: Upload build result artifacts
uses: actions/upload-artifact@v4
with:
name: Build results (NuGet)
path: packages/*.nupkg
- name: Build docs website
run: docfx CSF.Extensions.WebDriver.Docs/docfx.json
- name: Upload docs website artifact
uses: actions/upload-artifact@v4
with:
name: Docs website
path: docs/**/*