Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgraded infrastructure + onboard to GitHub Codespaces + upgraded dependencies #401

Merged
merged 55 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
f27d49e
Converted to CPS, upgraded versions of components to latest
CodeCyclone Feb 15, 2024
80755bf
Onboarding to GitHub Codebases
CodeCyclone Feb 15, 2024
0ac2b6e
Adding common extensions to VS Code, useful to this repo
CodeCyclone Feb 15, 2024
8ebfe75
CPM changes
CodeCyclone Feb 15, 2024
9ee96c5
Upgrade to .NET 8 for running tests
CodeCyclone Feb 15, 2024
6e26d6e
Adding dotnet build support
CodeCyclone Feb 15, 2024
38a4cf3
Added some things to devcontainer, mainly for VS extensions
CodeCyclone Feb 16, 2024
0089e10
Fix for running build on Linux, referencing PowerShell
CodeCyclone Feb 16, 2024
58ecb93
Update Appveyor to VS 2022
CodeCyclone Feb 17, 2024
e2b8e9c
Fix for quoting PWSH
CodeCyclone Feb 17, 2024
ba48b2d
Fixing tasks for GitHub Codespaces
CodeCyclone Feb 17, 2024
0181b32
Updating GetNetstandardAssembly to support Linux and pull .NET 8 nets…
CodeCyclone Feb 17, 2024
d0800c9
Fix for dotnet version being referenced
CodeCyclone Feb 20, 2024
7d51276
Testing adding a pr.yml file to test github runner
CodeCyclone Feb 20, 2024
1092816
Updated runs-on label
CodeCyclone Feb 20, 2024
a752fc7
Switching to runs-on
CodeCyclone Feb 21, 2024
b66d635
fix for runs-on
CodeCyclone Feb 21, 2024
8e9f45c
Adding GitVersion and PR YAML updates
CodeCyclone Feb 21, 2024
a99a825
Updated pool to powerb-powershell-pool
CodeCyclone Feb 22, 2024
92e54dd
Created the package release YAML
CodeCyclone Feb 22, 2024
a77b2a4
Fix for referencencing .NET version for GetNetstandardAssembly.ps1
CodeCyclone Feb 22, 2024
843aeba
Filled out pr YAML more
CodeCyclone Feb 22, 2024
7a5f63b
Fix for trigger on pr YAML
CodeCyclone Feb 22, 2024
ed766bd
Fixes for YAML and formatting changes
CodeCyclone Feb 22, 2024
6434203
Fix for filtering UI tests out from test run
CodeCyclone Feb 22, 2024
dbdc7a7
Moved CodeQL to a seperate branch
CodeCyclone Feb 22, 2024
69ad358
Changed hashing function to detect more content for cache
CodeCyclone Feb 27, 2024
a1493fc
Generating full paths and adding verbosity to normal for build step i…
CodeCyclone Mar 21, 2024
91f42f6
Making sure scripts are more compatible for Linux\MacOS
CodeCyclone Mar 21, 2024
d5091da
Updates to script to support PrepManualTesting.ps1 for Linux
CodeCyclone Mar 21, 2024
dc7f4fb
Changed how to get PATH seperator
CodeCyclone Mar 21, 2024
fa57cf1
Ignoring files for VSCode
CodeCyclone Mar 21, 2024
fe98a55
Fix for writing PSD1 file for Linux in UpdatePSModuleManifest.psd1
CodeCyclone Mar 21, 2024
869dcc1
Upgraded to .NET 8.0.303
CodeCyclone Jul 22, 2024
0aff5fa
update msal 4.64.0
d2xiaomicrosoft Sep 9, 2024
8ac9478
remove redirect uri
d2xiaomicrosoft Sep 9, 2024
dedd524
fix wam
d2xiaomicrosoft Sep 12, 2024
6b2b8d1
remove test code
d2xiaomicrosoft Sep 12, 2024
3cc769c
fix os
d2xiaomicrosoft Sep 19, 2024
bded7a8
Added Nerdbank.Giversion CLI tool
CodeCyclone Sep 28, 2024
6846fea
Making .NET version check less sensitive
CodeCyclone Oct 1, 2024
9202041
Fixing discovery of pwsh in build with new container images
CodeCyclone Oct 1, 2024
4888f87
Made Build.ps1 more flexible
CodeCyclone Oct 1, 2024
1dda2a2
New InstallDotnet script
CodeCyclone Oct 1, 2024
a8627fb
Fix for dotnet build call
CodeCyclone Oct 1, 2024
4ce5ff9
Fixes for finding version of dotnet SDK
CodeCyclone Oct 1, 2024
dd5bae2
Fix for escaping calling PowerShell
CodeCyclone Oct 1, 2024
38d5e25
Doc fixes for using Dev Container and GitHub Codespaces
CodeCyclone Oct 1, 2024
ddea473
Fixes to build and scripts
CodeCyclone Oct 1, 2024
0b155a6
More fixes to scripts
CodeCyclone Oct 1, 2024
0469e2c
Removed appveyor file to stop AppVeyor from scanning and triggering b…
CodeCyclone Nov 5, 2024
ad0466e
Merge branch 'chbeck/ghcodespaces' of https://github.com/microsoft/po…
d2xiaomicrosoft Nov 6, 2024
1d01e17
fix msal
d2xiaomicrosoft Nov 6, 2024
2b389bb
spacing
d2xiaomicrosoft Nov 6, 2024
17f0f25
Merge pull request #410 from microsoft/dxiao/update-msal-broker
CodeCyclone Nov 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"version": 1,
"isRoot": true,
"tools": {
"nbgv": {
"version": "3.6.143",
"commands": [
"nbgv"
],
"rollForward": false
}
}
}
47 changes: 47 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"name": "powerbi-powershell in Codespaces",
"image": "mcr.microsoft.com/dotnet/sdk:8.0",
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
"ghcr.io/devcontainers/features/github-cli:1": {
"version": "2"
},
"ghcr.io/devcontainers/features/powershell:1": {
"version": "latest"
},
"ghcr.io/devcontainers/features/common-utils:2": {},
"ghcr.io/devcontainers/features/dotnet:2": {
"version": "none",
"dotnetRuntimeVersions": "7.0",
"aspNetCoreRuntimeVersions": "7.0"
}
},
"customizations": {
"vscode": {
"extensions": [
"GitHub.copilot",
"GitHub.copilot-chat",
"GitHub.vscode-github-actions",
"ms-dotnettools.vscode-dotnet-runtime",
"ms-dotnettools.csdevkit",
"ms-dotnetools.csharp",
"ms-vscode.powershell",
"ms-dotnettools.vscodeintellicode-csharp",
"esbenp.prettier-vscode",
"github.github-vscode-theme",
"github.vscode-pull-request-github",
"github.vscode-codeql",
"ms-cst-e.vscode-devskim"
]
}
},
"postCreateCommand": "dotnet restore dirs.proj",
"hostRequirements": {
"memory": "8gb",
"cpus": 4
},
"remoteEnv": {
"DOTNET_MULTILEVEL_LOOKUP": "0",
"TARGET": "net8.0"
}
}
30 changes: 30 additions & 0 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Upload Package to GitHub Packages

on:
release:
types: [created]

jobs:
deploy:
runs-on: [self-hosted, 1ES.Pool=powerbi-powershell-pool]
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Need for history to be able to determine version number

- uses: actions/setup-dotnet@v3
with:
#dotnet-version: '8.0.x' # SDK Version to use.
global-json-file: 'global.json'
source-url: https://nuget.pkg.github.com/microsoft/powerbi-powershell/index.json
env:
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Create the package
run: dotnet pack --configuration Release dirs.proj

- name: Publish the package to GPR
run: dotnet nuget push PkgOut/*.nupkg
58 changes: 58 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net

name: PR Build
run-name: Executing Build for ${{ github.actor }} on ${{ github.repository }} for branch ${{ github.ref }}

on:
pull_request:
types:
- opened
- synchronize
- reopened
branches:
- master

jobs:
Build:
runs-on: [self-hosted, 1ES.Pool=powerbi-powershell-pool]
steps:
- name: Check out repository code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Need for history to be able to determine version number

- name: Disable StrongName
shell: pwsh
run: |
scripts/DisableStrongName.ps1

- name: Setup .NET 8.x
uses: actions/setup-dotnet@v3
with:
# Semantic version range syntax or exact version of a dotnet version
#dotnet-version: '8.x'
global-json-file: 'global.json'

- uses: actions/cache@v3
with:
path: ~/.nuget/packages
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.*proj','**/*.props','**/*.targets','**/*.cs') }}
restore-keys: |
${{ runner.os }}-nuget

- name: Restore dependencies
run: dotnet restore dirs.proj

- name: Build
run: dotnet build --no-restore dirs.proj --property:GenerateFullPaths=true --verbosity normal

- name: Test
run: dotnet test --no-build --no-restore --filter "TestCategory!=Interactive" --verbosity normal --logger trx --results-directory "TestResults" dirs.proj

- name: Publish Test Results
uses: actions/upload-artifact@v4
with:
name: TestResults
path: TestResults
if: ${{ always() }}
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -291,4 +291,7 @@ __pycache__/
*.binlog

# Package Build Output
PkgOut/
PkgOut/

# Mono\VSCode development
.mono/
17 changes: 17 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"recommendations": [
"ms-vscode.powershell",
"ms-dotnettools.csdevkit",
"ms-dotnettools.vscodeintellicode-csharp",
"GitHub.copilot",
"GitHub.copilot-chat",
"MS-CST-E.vscode-devskim",
"ms-sarifvscode.sarif-viewer",
"esbenp.prettier-vscode",
"github.codespaces",
"github.github-vscode-theme",
"github.vscode-pull-request-github",
"github.vscode-github-actions",
"github.vscode-codeql"
]
}
13 changes: 13 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,19 @@
"type": "coreclr",
"request": "attach",
"processId": "${command:pickProcess}"
},
{
"type": "PowerShell",
"request": "attach",
"name": "PowerShell Attach to Host Process",
"processId": "${command:PickPSHostProcess}",
"runspaceId": 1
},
{
"type": "PowerShell",
"request": "launch",
"name": "PowerShell Interactive Session",
"cwd": "${workspaceRoot}"
}
,]
}
4 changes: 3 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"**/.vs/": true,
"**/bin/": true,
"**/obj/": true,
"TestResult/": true
"TestResult/": true,
".mono/": true,
"powerbi-powershell.sln": true
}
}
79 changes: 69 additions & 10 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{
// https://code.visualstudio.com/docs/editor/variables-reference
// Example: https://github.com/PowerShell/vscode-powershell/blob/main/examples/.vscode/tasks.json
"version": "2.0.0",
"windows": {
"options": {
"shell": {
"executable": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
"executable": "C:\\Program Files\\PowerShell\\7\\pwsh.exe",
"args": [
"-NoProfile",
"-ExecutionPolicy",
Expand Down Expand Up @@ -38,12 +39,46 @@
},
"tasks": [
{
"label": "Build",
"label": "Build via dotnet",
"command": "dotnet",
"type": "process",
"group": {
"kind": "build",
"isDefault": true
},
"args": [
"build",
"${workspaceFolder}/dirs.proj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "Build (Release) via dotnet",
"command": "dotnet",
"type": "process",
"group": {
"kind": "build",
"isDefault": true
},
"args": [
"build",
"-c",
"Release",
"${workspaceFolder}/dirs.proj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "Build via Shell",
"type": "shell",
"command": "& '${workspaceFolder}\\scripts\\Build.ps1'",
"group": {
"kind": "build",
"isDefault": true
"isDefault": false
},
"problemMatcher": "$msCompile"
},
Expand All @@ -60,25 +95,49 @@
// }
// },
{
"label": "Clean",
"label": "Clean via Shell",
"type": "shell",
"command": "& '${workspaceFolder}\\scripts\\Build.ps1' -Clean -NoBuild",
"problemMatcher": "$msCompile"
},
{
"label": "Pack",
"label": "Clean via dotnet",
"command": "dotnet",
"type": "process",
"args": [
"clean",
"${workspaceFolder}/dirs.proj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "Pack via Shell",
"type": "shell",
"command": "& '${workspaceFolder}\\scripts\\Build.ps1' -Pack -Clean",
"problemMatcher": "$msCompile"
},
{
"label": "Restore",
"label": "Pack (release build) via dotnet",
"command": "dotnet",
"type": "process",
"args": [
"pack",
"${workspaceFolder}/dirs.proj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "Restore via Shell",
"type": "shell",
"command": "& '${workspaceFolder}\\scripts\\RestorePackages.ps1'",
"problemMatcher": "$msCompile"
},
{
"label": "Test",
"label": "Test via Shell",
"type": "shell",
"command": "& '${workspaceFolder}\\scripts\\Test.ps1'",
"group": "test",
Expand All @@ -89,7 +148,7 @@
}
},
{
"label": "PrepManualTesting",
"label": "PrepManualTesting via Shell",
"type": "shell",
"command": "& '${workspaceFolder}\\scripts\\PrepManualTesting.ps1' -Build -Force",
"problemMatcher": "$msCompile",
Expand All @@ -102,7 +161,7 @@
}
},
{
"label": "DebugTest",
"label": "DebugTest via Shell",
"type": "shell",
"command": "& '${workspaceFolder}\\scripts\\DebugTest.ps1' -TestName '${selectedText}' -DirectoryName '${fileDirname}'",
"problemMatcher": "$msCompile",
Expand All @@ -116,7 +175,7 @@
}
},
{
"label": "DebugTest (No Build)",
"label": "DebugTest (No Build) via Shell",
"type": "shell",
"command": "& '${workspaceFolder}\\scripts\\DebugTest.ps1' -TestName '${selectedText}' -DirectoryName '${fileDirname}' -NoBuild",
"problemMatcher": "$msCompile",
Expand Down
Loading
Loading