Add github actions workflow for tests

This commit is contained in:
jvyden 2021-10-16 20:01:21 -04:00
parent d2dcc68421
commit 934bc450bc
No known key found for this signature in database
GPG key ID: 18BCF2BE0262B278
2 changed files with 46 additions and 0 deletions

45
.github/workflows/ci.yml vendored Normal file
View file

@ -0,0 +1,45 @@
on: [push, pull_request]
name: Continuous Integration
jobs:
test:
name: Test
runs-on: ${{matrix.os.fullname}}
strategy:
fail-fast: false
matrix:
os:
- { prettyname: Windows, fullname: windows-latest }
- { prettyname: macOS, fullname: macos-latest }
- { prettyname: Linux, fullname: ubuntu-latest }
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install .NET 5.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: "5.0.x"
- name: Install .NET 6.0 Preview
uses: actions/setup-dotnet@v1
with:
dotnet-version: "6.0.x"
include-prerelease: true
- name: Compile
run: dotnet build -C Debug
- name: Test
run: --logger "trx;LogFileName=TestResults-${{matrix.os.prettyname}}-${{matrix.threadingMode}}.trx"
# Attempt to upload results even if test fails.
# https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#always
- name: Upload Test Results
uses: actions/upload-artifact@v2
if: ${{ always() }}
with:
name: osu-test-results-${{matrix.os.prettyname}}-${{matrix.threadingMode}}
path: ${{github.workspace}}/TestResults/TestResults-${{matrix.os.prettyname}}-${{matrix.threadingMode}}.trx

View file

@ -3,6 +3,7 @@
<component name="UserContentModel">
<attachedFolders />
<explicitIncludes>
<Path>.github</Path>
<Path>.gitignore</Path>
<Path>.idea</Path>
<Path>DatabaseMigrations</Path>