-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #401 from microsoft/chbeck/ghcodespaces
Upgraded infrastructure + onboard to GitHub Codespaces + upgraded dependencies
- Loading branch information
Showing
39 changed files
with
731 additions
and
181 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -291,4 +291,7 @@ __pycache__/ | |
*.binlog | ||
|
||
# Package Build Output | ||
PkgOut/ | ||
PkgOut/ | ||
|
||
# Mono\VSCode development | ||
.mono/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.