Update github workflow steps. Use global.json. #29
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Continuous Integration | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- '**.md' | |
pull_request: | |
branches: | |
- main | |
paths-ignore: | |
- '**.md' | |
workflow_dispatch: | |
jobs: | |
compile: | |
runs-on: ubuntu-latest | |
if: "!contains(github.event.head_commit.message, 'skip ci')" | |
permissions: | |
security-events: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
global-json-file: global.json | |
- name: Build | |
run: dotnet build --configuration Debug | |
- name: Code Analysis | |
uses: JetBrains/ReSharper-InspectCode@v0.8 | |
with: | |
solution: ./NWNX.NET.sln | |
tool-version: 2024.3.0 | |
test: | |
runs-on: ubuntu-latest | |
if: "!contains(github.event.head_commit.message, 'skip ci')" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Build and Run Tests | |
uses: devcontainers/ci@v0.3 | |
with: | |
push: never | |
env: | | |
NWNX_DOTNET_ASSEMBLY=/workspaces/NWNX.NET/NWNX.NET.Tests/bin/Release/NWNX.NET.Tests | |
NWNX_DOTNET_TEST_RESULT_PATH=/workspaces/NWNX.NET/NWNX.NET.Tests/bin/Release/NWNX.NET.Tests/results | |
runCmd: | | |
dotnet build --configuration Release | |
cd /nwn/data/bin/linux-amd64 | |
/nwn/run-server.sh | |
- name: Upload Event File | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: Event File | |
path: ${{ github.event_path }} | |
- name: Upload Results | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: Test Results | |
path: NWNX.NET.Tests/bin/Release/NWNX.NET.Tests/results/*.xml |