Skip to content

Nightly Build

Nightly Build #40

Workflow file for this run

name: Nightly Build
on:
schedule:
- cron: "0 2 * * *" # Runs at 2 AM UTC every day
workflow_dispatch: # Allows manual triggering
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: 16gb_16_core_large_window_runner
if: github.repository_owner == 'sourcegraph'
steps:
- uses: actions/checkout@v3
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.3
- name: Change Screen Resolution
shell: pwsh
run: Set-DisplayResolution -Width 1920 -Height 1080 -Force
- name: ⚙️ Prepare Visual Studio
run: '&"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\devenv.exe" /RootSuffix Exp /ResetSettings General.vssettings'
- name: Install Cake.Tool
run: dotnet tool install --global Cake.Tool
- name: Restore NuGet packages
run: nuget restore src\Cody.Core\Cody.Core.csproj -PackagesDirectory src\packages
- name: Common Build Setup
run: |
cd src
dotnet tool restore
corepack enable
- name: Build Cody Agent (main branch)
run: |
cd src
corepack install --global pnpm@8.6.7
dotnet cake --target=BuildCodyAgent --cody-branch=main
- name: Build Extension (Debug)
run: |
cd src
dotnet cake --target=BuildDebug
- name: Tests
env:
Access_Token_UI_Tests: ${{ secrets.SRC_ACCESS_TOKEN_DOTCOM }}
run: |
cd src
dotnet test .\Cody.VisualStudio.Tests\bin\Debug\Cody.VisualStudio.Tests.dll -v detailed -l:trx
- name: Upload screenshots for UI tests
uses: actions/upload-artifact@v4
if: always()
with:
name: UI Tests Screenshots
path: src/Cody.VisualStudio.Tests/bin/Debug/Screenshots
retention-days: 5
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action/windows@v2
if: always()
with:
files: |
src\TestResults/**/*.xml
src\TestResults/**/*.trx
src\TestResults/**/*.json