mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-24 14:11:29 +00:00
Add github actions workflow for tests
This commit is contained in:
parent
d2dcc68421
commit
934bc450bc
2 changed files with 46 additions and 0 deletions
45
.github/workflows/ci.yml
vendored
Normal file
45
.github/workflows/ci.yml
vendored
Normal 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
|
|
@ -3,6 +3,7 @@
|
|||
<component name="UserContentModel">
|
||||
<attachedFolders />
|
||||
<explicitIncludes>
|
||||
<Path>.github</Path>
|
||||
<Path>.gitignore</Path>
|
||||
<Path>.idea</Path>
|
||||
<Path>DatabaseMigrations</Path>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue