Minor workflow cleanups

This commit is contained in:
Jordan Brown
2020-07-30 14:44:59 -04:00
parent 20e75a6b6a
commit 6c5fed96c1
+60 -60
View File
@@ -85,7 +85,7 @@ jobs:
run: mkdir -p $DOXDIR
- name: Prep gh-pages Repository
if: github.event_name == 'push' && github.ref == 'dev'
if: github.event_name == 'push' && github.event.ref == 'dev'
run: |
git clone -b gh-pages --single-branch "https://git@github.com/tgstation/tgstation-server" "$DOXDIR"
rm -r "$DOXDIR/*"
@@ -96,7 +96,7 @@ jobs:
doxyfile-path: 'docs/Doxyfile'
- name: gh-pages push
if: github.event_name == 'push' && github.ref == 'dev'
if: github.event_name == 'push' && github.event.ref == 'dev'
run: |
cd $DOXDIR
git config --global push.default simple
@@ -175,6 +175,64 @@ jobs:
name: windows-unit-test-coverage-${{ matrix.configuration }}
path: ./TestResults/
windows-integration-test:
name: Windows Integration Test
needs: dmapi-build
env:
TGS4_TEST_CONNECTION_STRING: Server=(localdb)\MSSQLLocalDB;Integrated Security=true;Initial Catalog=TGS_Test;Application Name=tgstation-server
TGS4_TEST_DATABASE_TYPE: SqlServer
TGS4_TEST_DUMP_API_SPEC: yes
strategy:
matrix:
watchdog-type: [ 'Basic', 'System' ]
configuration: [ 'Debug', 'Release' ]
runs-on: windows-latest
steps:
- name: Set General__UseBasicWatchdog
if: ${{ matrix.watchdog-type == 'Basic' }}
run: echo "::set-env name=General__UseBasicWatchdog::true"
- name: Checkout
uses: actions/checkout@v1
- name: Set TGS4_TEST_PULL_REQUEST_NUMBER
if: ${{ github.event_name == 'pull_request' }}
run: echo "::set-env name=TGS4_TEST_PULL_REQUEST_NUMBER::${{ github.event.number }}"
- name: Run Integration Test
run: |
cd tests/Tgstation.Server.Tests
Start-Sleep -Seconds 10
dotnet test -c ${{ matrix.configuration }} -l "console;verbosity=detailed;noprogress=true" --collect:"XPlat Code Coverage" --settings ../../build/coverlet.runsettings -r ./TestResults
- name: Store Code Coverage
uses: actions/upload-artifact@v2
with:
name: windows-integration-test-coverage-${{ matrix.configuration }}-${{ matrix.watchdog-type }}
path: tests/Tgstation.Server.Tests/TestResults/
- name: Store OpenAPI Spec
if: ${{ matrix.configuration == 'Release' && matrix.watchdog-type == 'System' }}
uses: actions/upload-artifact@v2
with:
name: openapi-spec
path: C:/swagger.json
- name: Package Server Service
if: ${{ matrix.configuration == 'Release' && matrix.watchdog-type == 'Basic' }}
run: |
cd src/Tgstation.Server.Host.Service
dotnet publish -c ${{ matrix.configuration }} -o ../../Artifacts/Service
cd ../Tgstation.Server.Host
dotnet publish -c ${{ matrix.configuration }} --no-build -o ../../Artifacts/Service/lib/Default
- name: Store Server Service
if: ${{ matrix.configuration == 'Release' && matrix.watchdog-type == 'Basic' }}
uses: actions/upload-artifact@v2
with:
name: ServerService
path: Artifacts/Service/
linux-integration-tests:
name: Linux Integration Tests
needs: dmapi-build
@@ -315,64 +373,6 @@ jobs:
name: ServerUpdatePackage
path: Artifacts/ServerUpdate/
windows-integration-test:
name: Windows Integration Test
needs: dmapi-build
env:
TGS4_TEST_CONNECTION_STRING: Server=(localdb)\MSSQLLocalDB;Integrated Security=true;Initial Catalog=TGS_Test;Application Name=tgstation-server
TGS4_TEST_DATABASE_TYPE: SqlServer
TGS4_TEST_DUMP_API_SPEC: yes
strategy:
matrix:
watchdog-type: [ 'Basic', 'System' ]
configuration: [ 'Debug', 'Release' ]
runs-on: windows-latest
steps:
- name: Set General__UseBasicWatchdog
if: ${{ matrix.watchdog-type == 'Basic' }}
run: echo "::set-env name=General__UseBasicWatchdog::true"
- name: Checkout
uses: actions/checkout@v1
- name: Set TGS4_TEST_PULL_REQUEST_NUMBER
if: ${{ github.event_name == 'pull_request' }}
run: echo "::set-env name=TGS4_TEST_PULL_REQUEST_NUMBER::${{ github.event.number }}"
- name: Run Integration Test
run: |
cd tests/Tgstation.Server.Tests
Start-Sleep -Seconds 10
dotnet test -c ${{ matrix.configuration }} -l "console;verbosity=detailed;noprogress=true" --collect:"XPlat Code Coverage" --settings ../../build/coverlet.runsettings -r ./TestResults
- name: Store Code Coverage
uses: actions/upload-artifact@v2
with:
name: windows-integration-test-coverage-${{ matrix.configuration }}-${{ matrix.watchdog-type }}
path: tests/Tgstation.Server.Tests/TestResults/
- name: Store OpenAPI Spec
if: ${{ matrix.configuration == 'Release' && matrix.watchdog-type == 'System' }}
uses: actions/upload-artifact@v2
with:
name: openapi-spec
path: C:/swagger.json
- name: Package Server Service
if: ${{ matrix.configuration == 'Release' && matrix.watchdog-type == 'Basic' }}
run: |
cd src/Tgstation.Server.Host.Service
dotnet publish -c ${{ matrix.configuration }} -o ../../Artifacts/Service
cd ../Tgstation.Server.Host
dotnet publish -c ${{ matrix.configuration }} --no-build -o ../../Artifacts/Service/lib/Default
- name: Store Server Service
if: ${{ matrix.configuration == 'Release' && matrix.watchdog-type == 'Basic' }}
uses: actions/upload-artifact@v2
with:
name: ServerService
path: Artifacts/Service/
validate-openapi-spec:
name: OpenAPI Spec Validation
needs: windows-integration-test