Skip to content

Commit

Permalink
CI improvements, fix plugin unloading crash
Browse files Browse the repository at this point in the history
  • Loading branch information
Mooshua committed Aug 16, 2023
1 parent 258d8e9 commit 3153c17
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
18 changes: 7 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on: [push, pull_request]

jobs:
build:
name: Build Nightlies
needs: [test]
runs-on: ubuntu-latest
strategy:
Expand All @@ -30,16 +31,11 @@ jobs:
- name: Upload Files
uses: actions/upload-artifact@v3
with:
name: Nightly ${{ matrix.runtime }}
name: nightly_${{ matrix.runtime }}
path: build/
test:

name: Tests
runs-on: ubuntu-latest
strategy:
matrix:
framework-version: [ 'net6.0' ]
fail-fast: false

steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -55,7 +51,7 @@ jobs:

- name: Install dependencies
run: dotnet restore BitMod.sln
- name: Build for ${{ matrix.framework-version }}
run: dotnet build tests/BitMod.Tests --framework ${{ matrix.framework-version }} --configuration Release --no-restore
- name: Test for ${{ matrix.framework-version }}
run: dotnet test tests/BitMod.Tests --framework ${{ matrix.framework-version }} --configuration Release --no-build --no-restore --verbosity normal
- name: Build
run: dotnet build tests/BitMod.Tests --framework net6.0 --configuration Release --no-restore
- name: Test
run: dotnet test tests/BitMod.Tests --framework net6.0 --configuration Release --no-build --no-restore --verbosity normal
3 changes: 3 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
# Replace `main` with your branch’s name
push:
branches: ["master"]
# Only run if docs actually change
paths:
- "docs/**"
# Specify to run a workflow manually from the Actions tab on GitHub
workflow_dispatch:

Expand Down
2 changes: 1 addition & 1 deletion standalone/BitMod.Plugins/PluginSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ internal void Unload(Plugin plugin)

internal void Deleted(string name)
{
foreach (Plugin plugin1 in _plugins.Where(plugin => plugin.Name == name))
foreach (Plugin plugin1 in _plugins.Where(plugin => plugin.Name == name).ToList())
{
plugin1.UnloadPlugin();
}
Expand Down

0 comments on commit 3153c17

Please sign in to comment.