ci: add Forgejo Actions build-and-test workflow
Some checks failed
CI / build-and-test (push) Has been cancelled
Some checks failed
CI / build-and-test (push) Has been cancelled
This commit is contained in:
parent
f21e818b28
commit
5ac0a50afe
1 changed files with 44 additions and 0 deletions
44
.forgejo/workflows/ci.yml
Normal file
44
.forgejo/workflows/ci.yml
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
build-and-test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install .NET 8
|
||||
run: |
|
||||
curl -sSL https://dot.net/v1/dotnet-install.sh -o dotnet-install.sh
|
||||
chmod +x dotnet-install.sh
|
||||
./dotnet-install.sh --channel 8.0 --install-dir $HOME/.dotnet
|
||||
echo "$HOME/.dotnet" >> $GITHUB_PATH
|
||||
echo "DOTNET_ROOT=$HOME/.dotnet" >> $GITHUB_ENV
|
||||
|
||||
- name: Restore (Linux solution filter — excludes Windows-only WPF app)
|
||||
run: dotnet restore TeamsISO.Linux.slnf
|
||||
|
||||
- name: Build (Release, treat warnings as errors)
|
||||
run: dotnet build TeamsISO.Linux.slnf --configuration Release --no-restore
|
||||
|
||||
- name: Test (excluding requires=ndi)
|
||||
run: >
|
||||
dotnet test TeamsISO.Linux.slnf
|
||||
--configuration Release
|
||||
--no-build
|
||||
--logger "trx;LogFileName=test-results.trx"
|
||||
--collect:"XPlat Code Coverage"
|
||||
--filter "Category!=ndi&requires!=ndi"
|
||||
|
||||
- name: Upload test results
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: test-results
|
||||
path: '**/test-results.trx'
|
||||
Loading…
Reference in a new issue