Repository navigation
79 lines (66 loc) · 2.37 KB
/
Copy pathcopilot-setup-steps.yml
File metadata and controls
79 lines (66 loc) · 2.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Setup GitHub Copilot Agent Environment
on:
workflow_dispatch:
push:
paths:
- '.github/workflows/copilot-setup-steps.yml'
pull_request:
paths:
- '.github/workflows/copilot-setup-steps.yml'
permissions:
contents: read
jobs:
copilot-setup-steps:
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: read
steps:
- uses: actions/checkout@v7.0.1
- name: Set up .NET Core
uses: actions/setup-dotnet@v6
with:
global-json-file: global.json
source-url: https://pkgs.dev.azure.com/intelliTect/_packaging/EssentialCSharp/nuget/v3/index.json
env:
NUGET_AUTH_TOKEN: ${{ secrets.AZURE_DEVOPS_PAT }}
- name: Set up Node.js for frontend development
uses: actions/setup-node@v7.1.0
with:
node-version-file: EssentialCSharp.Web/.nvmrc
cache: npm
cache-dependency-path: EssentialCSharp.Web/package-lock.json
- name: Set up dependency caching for faster builds
uses: actions/cache@v6
id: nuget-cache
with:
path: |
~/.nuget/packages
${{ github.workspace }}/**/obj/project.assets.json
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
${{ runner.os }}-nuget-
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Install additional development tools
shell: bash
run: |
echo "Installing additional tools for Copilot agent environment..."
if dotnet tool list --global | grep -q 'dotnet-ef'; then
dotnet tool update --global dotnet-ef
else
dotnet tool install --global dotnet-ef
fi
- name: Restore with dotnet
run: dotnet restore
- name: Install npm dependencies
working-directory: EssentialCSharp.Web
run: npm ci
- name: Build frontend
working-directory: EssentialCSharp.Web
run: npm run build
- name: Build with dotnet
run: dotnet build -p:ContinuousIntegrationBuild=True -p:ReleaseDateAttribute=True -p:SkipFrontendBuild=true --configuration Release --no-restore
- name: Run .NET Tests
run: dotnet test --no-build --configuration Release