Skip to content

Commit

Permalink
Add GitHub actions to build and package.
Browse files Browse the repository at this point in the history
Based on https://github.com/actions/starter-workflows/blob/main/ci/dotnet.yml.

This requires the WpfApplication to be converted to a .NET 6 project and
added to the UITests project dependencies so that it is built before it
is used in the tests.
  • Loading branch information
aristotelos committed Mar 21, 2024
0 parents commit 43fc8d5
Show file tree
Hide file tree
Showing 74 changed files with 4,553 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: .NET

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:

build:

runs-on: windows-latest

env:
Configuration: Release

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x

- name: Restore dependencies
run: dotnet restore
working-directory: ./src

- name: Build
run: dotnet build --no-restore --configuration $env:Configuration
working-directory: ./src

- name: Test
run: dotnet test --no-build --configuration $env:Configuration --verbosity normal
working-directory: ./src

# Unfortunately, --no-build does not seem to work when we publish a specific project, so we use --no-restore instead
- name: Publish
run: dotnet publish FlaUI.WebDriver/FlaUI.WebDriver.csproj --no-restore --configuration $env:Configuration --self-contained
working-directory: ./src

- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: package
path: ./src/FlaUI.WebDriver/bin/Release/win-x64/publish
Loading

0 comments on commit 43fc8d5

Please sign in to comment.