Nightlies

- Add midnight UTC scheduled CI. Has to be on the default branch, currently dev
This commit is contained in:
Dominion
2023-05-20 21:26:24 -04:00
parent 3f91c060cd
commit 338bff090c
+41 -40
View File
@@ -1,6 +1,8 @@
name: 'CI'
on:
schedule:
- cron: 0 0 * * *
push:
branches:
- dev
@@ -54,7 +56,7 @@ jobs:
name: Start CI Run Gate
needs: security-checkpoint
runs-on: ubuntu-latest
if: "!(cancelled() || failure()) && (needs.security-checkpoint.result == 'success' || (needs.security-checkpoint.result == 'skipped' && (github.event_name == 'push' || (github.event.pull_request.head.repo.id == github.event.pull_request.base.repo.id && github.event_name != 'pull_request_target'))))"
if: "!(cancelled() || failure()) && (needs.security-checkpoint.result == 'success' || (needs.security-checkpoint.result == 'skipped' && (github.event_name == 'push' || github.event_name == 'schedule' || (github.event.pull_request.head.repo.id == github.event.pull_request.base.repo.id && github.event_name != 'pull_request_target'))))"
steps:
- name: GitHub Requires at Least One Step for a Job
run: exit 0
@@ -73,9 +75,9 @@ jobs:
- name: Upgrade NPM
run: npm install -g npm
- name: Checkout (Branch Push)
- name: Checkout (Branch)
uses: actions/checkout@v3
if: github.event_name == 'push'
if: github.event_name == 'push' || github.event_name == 'schedule'
with:
fetch-depth: 2
@@ -124,9 +126,9 @@ jobs:
make here
exit 0
- name: Checkout (Branch Push)
- name: Checkout (Branch)
uses: actions/checkout@v3
if: github.event_name == 'push'
if: github.event_name == 'push' || github.event_name == 'schedule'
- name: Checkout (PR Merge)
uses: actions/checkout@v3
@@ -160,9 +162,9 @@ jobs:
needs: start-ci-run-gate
if: "!(cancelled() || failure()) && needs.start-ci-run-gate.result == 'success'"
steps:
- name: Checkout (Branch Push)
- name: Checkout (Branch)
uses: actions/checkout@v3
if: github.event_name == 'push'
if: github.event_name == 'push' || github.event_name == 'schedule'
- name: Checkout (PR Merge)
uses: actions/checkout@v3
@@ -210,9 +212,9 @@ jobs:
needs: start-ci-run-gate
if: "!(cancelled() || failure()) && needs.start-ci-run-gate.result == 'success'"
steps:
- name: Checkout (Branch Push)
- name: Checkout (Branch)
uses: actions/checkout@v3
if: github.event_name == 'push'
if: github.event_name == 'push' || github.event_name == 'schedule'
- name: Checkout (PR Merge)
uses: actions/checkout@v3
@@ -238,9 +240,9 @@ jobs:
with:
dotnet-version: ${{ env.TGS_DOTNET_VERSION }}
- name: Checkout (Branch Push)
- name: Checkout (Branch)
uses: actions/checkout@v3
if: github.event_name == 'push'
if: github.event_name == 'push' || github.event_name == 'schedule'
- name: Checkout (PR Merge)
uses: actions/checkout@v3
@@ -278,9 +280,9 @@ jobs:
with:
dotnet-version: ${{ env.TGS_DOTNET_VERSION }}
- name: Checkout (Branch Push)
- name: Checkout (Branch)
uses: actions/checkout@v3
if: github.event_name == 'push'
if: github.event_name == 'push' || github.event_name == 'schedule'
- name: Checkout (PR Merge)
uses: actions/checkout@v3
@@ -335,9 +337,9 @@ jobs:
TGS_CONNSTRING_VALUE="Server=(localdb)\MSSQLLocalDB;Integrated Security=true;Initial Catalog=TGS_${{ matrix.watchdog-type }}_${{ matrix.configuration }};Application Name=tgstation-server"
echo "TGS_TEST_CONNECTION_STRING=$(echo $TGS_CONNSTRING_VALUE)" >> $GITHUB_ENV
- name: Checkout (Branch Push)
- name: Checkout (Branch)
uses: actions/checkout@v3
if: github.event_name == 'push'
if: github.event_name == 'push' || github.event_name == 'schedule'
- name: Checkout (PR Merge)
uses: actions/checkout@v3
@@ -480,9 +482,9 @@ jobs:
if: ${{ matrix.watchdog-type == 'Basic' }}
run: echo "General__UseBasicWatchdog=true" >> $GITHUB_ENV
- name: Checkout (Branch Push)
- name: Checkout (Branch)
uses: actions/checkout@v3
if: github.event_name == 'push'
if: github.event_name == 'push' || github.event_name == 'schedule'
- name: Checkout (PR Merge)
uses: actions/checkout@v3
@@ -549,9 +551,9 @@ jobs:
- name: Install IBM OpenAPI Validator
run: npm i -g ibm-openapi-validator@0.51.3
- name: Checkout (Branch Push)
- name: Checkout (Branch)
uses: actions/checkout@v3
if: github.event_name == 'push'
if: github.event_name == 'push' || github.event_name == 'schedule'
- name: Checkout (PR Merge)
uses: actions/checkout@v3
@@ -574,9 +576,9 @@ jobs:
if: "!(cancelled() || failure()) && needs.linux-unit-tests.result == 'success' && needs.linux-integration-tests.result == 'success' && needs.windows-unit-tests.result == 'success' && needs.windows-integration-test.result == 'success'"
runs-on: ubuntu-latest
steps:
- name: Checkout (Branch Push)
- name: Checkout (Branch)
uses: actions/checkout@v3
if: github.event_name == 'push'
if: github.event_name == 'push' || github.event_name == 'schedule'
- name: Checkout (PR Merge)
uses: actions/checkout@v3
@@ -728,16 +730,15 @@ jobs:
directory: ./code_coverage
fail_ci_if_error: true
deploy-http:
name: Deploy HTTP API
needs: [upload-code-coverage, validate-openapi-spec]
runs-on: windows-latest
if: "!(cancelled() || failure()) && needs.upload-code-coverage.result == 'success' && needs.validate-openapi-spec.result == 'success' && github.event_name == 'push' && contains(github.event.head_commit.message, '[APIDeploy]')"
if: "!(cancelled() || failure()) && needs.upload-code-coverage.result == 'success' && github.event_name != 'schedule' && needs.validate-openapi-spec.result == 'success' && github.event_name == 'push' && contains(github.event.head_commit.message, '[APIDeploy]')"
steps:
- name: Checkout (Branch Push)
- name: Checkout (Branch)
uses: actions/checkout@v3
if: github.event_name == 'push'
if: github.event_name == 'push' || github.event_name == 'schedule'
- name: Checkout (PR Merge)
uses: actions/checkout@v3
@@ -783,11 +784,11 @@ jobs:
name: Deploy DreamMaker API
needs: [upload-code-coverage, validate-openapi-spec]
runs-on: windows-latest
if: "!(cancelled() || failure()) && needs.upload-code-coverage.result == 'success' && needs.validate-openapi-spec.result == 'success' && github.event_name == 'push' && contains(github.event.head_commit.message, '[DMDeploy]')"
if: "!(cancelled() || failure()) && needs.upload-code-coverage.result == 'success' && github.event_name != 'schedule' && needs.validate-openapi-spec.result == 'success' && github.event_name == 'push' && contains(github.event.head_commit.message, '[DMDeploy]')"
steps:
- name: Checkout (Branch Push)
- name: Checkout (Branch)
uses: actions/checkout@v3
if: github.event_name == 'push'
if: github.event_name == 'push' || github.event_name == 'schedule'
- name: Checkout (PR Merge)
uses: actions/checkout@v3
@@ -832,16 +833,16 @@ jobs:
name: Deploy Nuget Packages
needs: [upload-code-coverage, validate-openapi-spec]
runs-on: ubuntu-latest
if: "!(cancelled() || failure()) && needs.upload-code-coverage.result == 'success' && needs.validate-openapi-spec.result == 'success' && github.event_name == 'push' && contains(github.event.head_commit.message, '[NugetDeploy]')"
if: "!(cancelled() || failure()) && needs.upload-code-coverage.result == 'success' && github.event_name != 'schedule' && needs.validate-openapi-spec.result == 'success' && github.event_name == 'push' && contains(github.event.head_commit.message, '[NugetDeploy]')"
steps:
- name: Setup dotnet
uses: actions/setup-dotnet@v2
with:
dotnet-version: ${{ env.TGS_DOTNET_VERSION }}
- name: Checkout (Branch Push)
- name: Checkout (Branch)
uses: actions/checkout@v3
if: github.event_name == 'push'
if: github.event_name == 'push' || github.event_name == 'schedule'
- name: Checkout (PR Merge)
uses: actions/checkout@v3
@@ -877,16 +878,16 @@ jobs:
name: Ensure TGS Release is Latest GitHub Release
needs: [deploy-dm, deploy-http]
runs-on: ubuntu-latest
if: "!(cancelled() || failure()) && (needs.deploy-dm.result == 'success' || needs.deploy-http.result == 'success') && !contains(github.event.head_commit.message, '[TGSDeploy]')"
if: "!(cancelled() || failure()) && github.event_name != 'schedule' && (needs.deploy-dm.result == 'success' || needs.deploy-http.result == 'success') && !contains(github.event.head_commit.message, '[TGSDeploy]')"
steps:
- name: Setup dotnet
uses: actions/setup-dotnet@v2
with:
dotnet-version: ${{ env.TGS_DOTNET_VERSION }}
- name: Checkout (Branch Push)
- name: Checkout (Branch)
uses: actions/checkout@v3
if: github.event_name == 'push'
if: github.event_name == 'push' || github.event_name == 'schedule'
- name: Checkout (PR Merge)
uses: actions/checkout@v3
@@ -901,16 +902,16 @@ jobs:
name: Deploy TGS
needs: [deploy-dm, deploy-http, upload-code-coverage, validate-openapi-spec]
runs-on: windows-latest
if: "!(cancelled() || failure()) && (needs.upload-code-coverage.result == 'success' || needs.validate-openapi-spec.result == 'success') && github.event_name == 'push' && github.event.ref == 'refs/heads/master' && contains(github.event.head_commit.message, '[TGSDeploy]')"
if: "!(cancelled() || failure()) && github.event_name != 'schedule' && (needs.upload-code-coverage.result == 'success' || needs.validate-openapi-spec.result == 'success') && github.event_name == 'push' && github.event.ref == 'refs/heads/master' && contains(github.event.head_commit.message, '[TGSDeploy]')"
steps:
- name: Setup dotnet
uses: actions/setup-dotnet@v2
with:
dotnet-version: ${{ env.TGS_DOTNET_VERSION }}
- name: Checkout (Branch Push)
- name: Checkout (Branch)
uses: actions/checkout@v3
if: github.event_name == 'push'
if: github.event_name == 'push' || github.event_name == 'schedule'
- name: Checkout (PR Merge)
uses: actions/checkout@v3
@@ -1024,12 +1025,12 @@ jobs:
deploy-docker:
name: Deploy TGS (Docker)
needs: [deploy-tgs]
if: "!(cancelled() || failure()) && needs.deploy-tgs.result == 'success'"
if: "!(cancelled() || failure()) && github.event_name != 'schedule' && needs.deploy-tgs.result == 'success'"
runs-on: ubuntu-latest
steps:
- name: Checkout (Branch Push)
- name: Checkout (Branch)
uses: actions/checkout@v3
if: github.event_name == 'push'
if: github.event_name == 'push' || github.event_name == 'schedule'
- name: Checkout (PR Merge)
uses: actions/checkout@v3