Skip to content

Commit

Permalink
F2calv/2024 09 updates (#193)
Browse files Browse the repository at this point in the history
* nuget updates

* implement vs2k22 messages

* update exception

* readme update

* more fixes

* CasCap.Interfaces -> CasCap.Abstractions

* LoginAsync added missing CancellationToken +semver:feature

* fix sq issues

* nuget updates

* logging

* global usings

* tidy

* update DI extensions

* update dependencies

* tidy ns

* add launchSettings.json

* add launchSettings.json

* test env vars

* test token

* tweak

* debug

* try this

* test

* try again

* debug

* fix

* checkout

* fix

* debugging

* xdg-utils

* try again

* tests

* fix

* allow CasCap.Common debugging

* update var

* try these tests

* rn

* fix ci

* Update CasCap.Apis.GooglePhotos.Release.sln

* nuget update

* fix sln file

* debug

* cleanup ci

* try all tests

* update comment

* lint fixes

* Newtonsoft -> System.Text.Json

* fix test

* fixes

* c#12 tweaks

* UploadProgressArgs -> UploadProgressEventArgs

* lint fix

* nuget updates

* update test atttributes

* lint fix

* update retry

* tweak retry

* tweak

* playing with resilience

* nuget updates

* Apis->Api

* Apis->Api

* Apis->Api

* nuget updates

* fun with VersionOverride

* fix

* lint fixes

* nuget fixes

* reversions

* disable integration tests
  • Loading branch information
f2calv authored Dec 2, 2024
1 parent f247d62 commit d832967
Show file tree
Hide file tree
Showing 56 changed files with 760 additions and 592 deletions.
47 changes: 26 additions & 21 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,30 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/dotnet
{
"name": "C# (.NET)",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/dotnet:1-8.0-bookworm",
// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers-contrib/features/pre-commit:2": {}
},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [5000, 5001],
// "portsAttributes": {
// "5001": {
// "protocol": "https"
// }
// }
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "sh . ./.devcontainer/postCreateCommand.sh",
"postStartCommand": "sh . ./.devcontainer/postStartCommand.sh",
// Configure tool-specific properties.
// "customizations": {},
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode"
"name": "C# (.NET)",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/dotnet:1-8.0-bookworm",
// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers-contrib/features/pre-commit:2": {},
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {}
},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [5000, 5001],
// "portsAttributes": {
// "5001": {
// "protocol": "https"
// }
// }
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "sh . ./.devcontainer/postCreateCommand.sh",
"postStartCommand": "sh . ./.devcontainer/postStartCommand.sh",
// Configure tool-specific properties.
// "customizations": {},
"mounts": [
"source=${localEnv:HOME}${localEnv:USERPROFILE}/source/github,target=/workspaces,type=bind,consistency=cached",
"source=${env:HOME}${env:USERPROFILE}/.kube,target=/home/vscode/.kube,type=bind"
]
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
1 change: 0 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,4 @@ updates:
- dependency-name: CasCap.Common.*
- dependency-name: coverlet.*
- dependency-name: Microsoft.NET.Test.Sdk
- dependency-name: Newtonsoft.Json
- dependency-name: xunit.*
42 changes: 36 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,40 @@ jobs:
lint:
uses: f2calv/gha-workflows/.github/workflows/lint.yml@v1

ci:
uses: f2calv/gha-workflows/.github/workflows/dotnet-publish-nuget.yml@v1
versioning:
uses: f2calv/gha-workflows/.github/workflows/gha-release-versioning.yml@v1
with:
configuration: ${{ github.event.inputs.configuration }}
push-preview: ${{ github.event.inputs.push-preview }}
secrets:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
tag-prefix: ''
tag-and-release: false

build:
runs-on: ubuntu-latest
needs: [versioning]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: f2calv/gha-dotnet-nuget@v2
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
configuration: ${{ inputs.configuration }}
push-preview: ${{ inputs.push-preview }}
version: ${{ needs.versioning.outputs.version }}
solution-name: CasCap.Api.GooglePhotos.Release.sln
execute-tests: false #Note: tests fail in Actions due to rate limiting issues from the Google side :/
env:
GOOGLE_PHOTOS_ACCESS_TOKEN: ${{ secrets.GOOGLE_PHOTOS_ACCESS_TOKEN }}

release:
needs: [versioning, build]
if: needs.versioning.outputs.release-exists == 'false'
&& (github.ref == format('refs/heads/{0}', github.event.repository.default_branch) || inputs.push-preview == 'true')
uses: f2calv/gha-workflows/.github/workflows/gha-release-versioning.yml@v1
permissions:
contents: write
with:
semVer: ${{ needs.versioning.outputs.version }}
tag-prefix: ''
move-major-tag: false
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-xml
- id: check-yaml
Expand All @@ -16,7 +16,7 @@ repos:
hooks:
- id: check-json5
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.41.0
rev: v0.43.0
hooks:
- id: markdownlint
args: ["--disable", "MD013", "--disable", "MD034", "--"]
78 changes: 78 additions & 0 deletions CasCap.Api.GooglePhotos.Debug.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.12.35309.182
MinimumVisualStudioVersion = 15.0.26124.0
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CasCap.Api.GooglePhotos", "src\CasCap.Api.GooglePhotos\CasCap.Api.GooglePhotos.csproj", "{2A448BCC-84A1-4512-87B3-2685E40B75C4}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CasCap.Api.GooglePhotos.Tests", "src\CasCap.Api.GooglePhotos.Tests\CasCap.Api.GooglePhotos.Tests.csproj", "{943A9741-D29D-455F-917F-95FF428F80FD}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{1FAD3270-948C-415D-9D2C-63D410E92476}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GenericHost", "samples\GenericHost\GenericHost.csproj", "{A6C54B65-6A2D-4BA9-8A11-6097CC351DA5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApp", "samples\ConsoleApp\ConsoleApp.csproj", "{CACAD45C-8DAF-4E61-B6F3-1C911656DB9D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CasCap.Common.Testing", "..\CasCap.Common\src\CasCap.Common.Testing\CasCap.Common.Testing.csproj", "{09BB7730-C89F-4978-BA26-99B347ACA7A4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CasCap.Common.Net", "..\CasCap.Common\src\CasCap.Common.Net\CasCap.Common.Net.csproj", "{B7278559-B5D2-4481-8C12-4C9F2516341A}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CasCap.Common", "CasCap.Common", "{4092EFD9-C0EE-4876-8CEE-AA1289C1AC36}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{2A448BCC-84A1-4512-87B3-2685E40B75C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2A448BCC-84A1-4512-87B3-2685E40B75C4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2A448BCC-84A1-4512-87B3-2685E40B75C4}.Debug|x64.ActiveCfg = Debug|Any CPU
{2A448BCC-84A1-4512-87B3-2685E40B75C4}.Debug|x64.Build.0 = Debug|Any CPU
{2A448BCC-84A1-4512-87B3-2685E40B75C4}.Debug|x86.ActiveCfg = Debug|Any CPU
{2A448BCC-84A1-4512-87B3-2685E40B75C4}.Debug|x86.Build.0 = Debug|Any CPU
{943A9741-D29D-455F-917F-95FF428F80FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{943A9741-D29D-455F-917F-95FF428F80FD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{943A9741-D29D-455F-917F-95FF428F80FD}.Debug|x64.ActiveCfg = Debug|Any CPU
{943A9741-D29D-455F-917F-95FF428F80FD}.Debug|x64.Build.0 = Debug|Any CPU
{943A9741-D29D-455F-917F-95FF428F80FD}.Debug|x86.ActiveCfg = Debug|Any CPU
{943A9741-D29D-455F-917F-95FF428F80FD}.Debug|x86.Build.0 = Debug|Any CPU
{A6C54B65-6A2D-4BA9-8A11-6097CC351DA5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A6C54B65-6A2D-4BA9-8A11-6097CC351DA5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A6C54B65-6A2D-4BA9-8A11-6097CC351DA5}.Debug|x64.ActiveCfg = Debug|Any CPU
{A6C54B65-6A2D-4BA9-8A11-6097CC351DA5}.Debug|x64.Build.0 = Debug|Any CPU
{A6C54B65-6A2D-4BA9-8A11-6097CC351DA5}.Debug|x86.ActiveCfg = Debug|Any CPU
{A6C54B65-6A2D-4BA9-8A11-6097CC351DA5}.Debug|x86.Build.0 = Debug|Any CPU
{CACAD45C-8DAF-4E61-B6F3-1C911656DB9D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CACAD45C-8DAF-4E61-B6F3-1C911656DB9D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CACAD45C-8DAF-4E61-B6F3-1C911656DB9D}.Debug|x64.ActiveCfg = Debug|Any CPU
{CACAD45C-8DAF-4E61-B6F3-1C911656DB9D}.Debug|x64.Build.0 = Debug|Any CPU
{CACAD45C-8DAF-4E61-B6F3-1C911656DB9D}.Debug|x86.ActiveCfg = Debug|Any CPU
{CACAD45C-8DAF-4E61-B6F3-1C911656DB9D}.Debug|x86.Build.0 = Debug|Any CPU
{09BB7730-C89F-4978-BA26-99B347ACA7A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{09BB7730-C89F-4978-BA26-99B347ACA7A4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{09BB7730-C89F-4978-BA26-99B347ACA7A4}.Debug|x64.ActiveCfg = Debug|Any CPU
{09BB7730-C89F-4978-BA26-99B347ACA7A4}.Debug|x64.Build.0 = Debug|Any CPU
{09BB7730-C89F-4978-BA26-99B347ACA7A4}.Debug|x86.ActiveCfg = Debug|Any CPU
{09BB7730-C89F-4978-BA26-99B347ACA7A4}.Debug|x86.Build.0 = Debug|Any CPU
{B7278559-B5D2-4481-8C12-4C9F2516341A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B7278559-B5D2-4481-8C12-4C9F2516341A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B7278559-B5D2-4481-8C12-4C9F2516341A}.Debug|x64.ActiveCfg = Debug|Any CPU
{B7278559-B5D2-4481-8C12-4C9F2516341A}.Debug|x64.Build.0 = Debug|Any CPU
{B7278559-B5D2-4481-8C12-4C9F2516341A}.Debug|x86.ActiveCfg = Debug|Any CPU
{B7278559-B5D2-4481-8C12-4C9F2516341A}.Debug|x86.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{A6C54B65-6A2D-4BA9-8A11-6097CC351DA5} = {1FAD3270-948C-415D-9D2C-63D410E92476}
{CACAD45C-8DAF-4E61-B6F3-1C911656DB9D} = {1FAD3270-948C-415D-9D2C-63D410E92476}
{09BB7730-C89F-4978-BA26-99B347ACA7A4} = {4092EFD9-C0EE-4876-8CEE-AA1289C1AC36}
{B7278559-B5D2-4481-8C12-4C9F2516341A} = {4092EFD9-C0EE-4876-8CEE-AA1289C1AC36}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {315434A5-DC61-4070-8452-C6695E1B14E0}
EndGlobalSection
EndGlobal
66 changes: 66 additions & 0 deletions CasCap.Api.GooglePhotos.Release.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.12.35309.182
MinimumVisualStudioVersion = 15.0.26124.0
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CasCap.Api.GooglePhotos", "src\CasCap.Api.GooglePhotos\CasCap.Api.GooglePhotos.csproj", "{2A448BCC-84A1-4512-87B3-2685E40B75C4}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CasCap.Api.GooglePhotos.Tests", "src\CasCap.Api.GooglePhotos.Tests\CasCap.Api.GooglePhotos.Tests.csproj", "{943A9741-D29D-455F-917F-95FF428F80FD}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{1FAD3270-948C-415D-9D2C-63D410E92476}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GenericHost", "samples\GenericHost\GenericHost.csproj", "{A6C54B65-6A2D-4BA9-8A11-6097CC351DA5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApp", "samples\ConsoleApp\ConsoleApp.csproj", "{CACAD45C-8DAF-4E61-B6F3-1C911656DB9D}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CasCap.Common", "CasCap.Common", "{4092EFD9-C0EE-4876-8CEE-AA1289C1AC36}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{8EC462FD-D22E-90A8-E5CE-7E832BA40C5D}"
ProjectSection(SolutionItems) = preProject
Directory.Build.props = Directory.Build.props
Directory.Packages.props = Directory.Packages.props
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{2A448BCC-84A1-4512-87B3-2685E40B75C4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2A448BCC-84A1-4512-87B3-2685E40B75C4}.Release|Any CPU.Build.0 = Release|Any CPU
{2A448BCC-84A1-4512-87B3-2685E40B75C4}.Release|x64.ActiveCfg = Release|Any CPU
{2A448BCC-84A1-4512-87B3-2685E40B75C4}.Release|x64.Build.0 = Release|Any CPU
{2A448BCC-84A1-4512-87B3-2685E40B75C4}.Release|x86.ActiveCfg = Release|Any CPU
{2A448BCC-84A1-4512-87B3-2685E40B75C4}.Release|x86.Build.0 = Release|Any CPU
{943A9741-D29D-455F-917F-95FF428F80FD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{943A9741-D29D-455F-917F-95FF428F80FD}.Release|Any CPU.Build.0 = Release|Any CPU
{943A9741-D29D-455F-917F-95FF428F80FD}.Release|x64.ActiveCfg = Release|Any CPU
{943A9741-D29D-455F-917F-95FF428F80FD}.Release|x64.Build.0 = Release|Any CPU
{943A9741-D29D-455F-917F-95FF428F80FD}.Release|x86.ActiveCfg = Release|Any CPU
{943A9741-D29D-455F-917F-95FF428F80FD}.Release|x86.Build.0 = Release|Any CPU
{A6C54B65-6A2D-4BA9-8A11-6097CC351DA5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A6C54B65-6A2D-4BA9-8A11-6097CC351DA5}.Release|Any CPU.Build.0 = Release|Any CPU
{A6C54B65-6A2D-4BA9-8A11-6097CC351DA5}.Release|x64.ActiveCfg = Release|Any CPU
{A6C54B65-6A2D-4BA9-8A11-6097CC351DA5}.Release|x64.Build.0 = Release|Any CPU
{A6C54B65-6A2D-4BA9-8A11-6097CC351DA5}.Release|x86.ActiveCfg = Release|Any CPU
{A6C54B65-6A2D-4BA9-8A11-6097CC351DA5}.Release|x86.Build.0 = Release|Any CPU
{CACAD45C-8DAF-4E61-B6F3-1C911656DB9D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CACAD45C-8DAF-4E61-B6F3-1C911656DB9D}.Release|Any CPU.Build.0 = Release|Any CPU
{CACAD45C-8DAF-4E61-B6F3-1C911656DB9D}.Release|x64.ActiveCfg = Release|Any CPU
{CACAD45C-8DAF-4E61-B6F3-1C911656DB9D}.Release|x64.Build.0 = Release|Any CPU
{CACAD45C-8DAF-4E61-B6F3-1C911656DB9D}.Release|x86.ActiveCfg = Release|Any CPU
{CACAD45C-8DAF-4E61-B6F3-1C911656DB9D}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{A6C54B65-6A2D-4BA9-8A11-6097CC351DA5} = {1FAD3270-948C-415D-9D2C-63D410E92476}
{CACAD45C-8DAF-4E61-B6F3-1C911656DB9D} = {1FAD3270-948C-415D-9D2C-63D410E92476}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {315434A5-DC61-4070-8452-C6695E1B14E0}
EndGlobalSection
EndGlobal
83 changes: 0 additions & 83 deletions CasCap.Apis.GooglePhotos.sln

This file was deleted.

Loading

0 comments on commit d832967

Please sign in to comment.