Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Apollo3zehn committed Mar 2, 2024
1 parent 3147fe8 commit 7bacde0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
# "run cleanup": https://betterprogramming.pub/enforce-net-code-style-with-editorconfig-d2f0d79091ac
# TODO: build real editorconfig file: https://github.com/dotnet/roslyn/blob/main/.editorconfig

# Make field
dotnet_diagnostic.IDE0044.severity = warning

# Enable naming rule violation errors on build (alternative: dotnet_analyzer_diagnostic.category-Style.severity = error)
dotnet_diagnostic.IDE1006.severity = error

Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ jobs:
run: |
(cd src/Nexus.UI && libman restore)
dotnet publish -c Release -o app /p:GeneratePackage=true src/Nexus/Nexus.csproj
python -m build --wheel --outdir artifacts/packages --no-isolation src/clients/python-client
python -m build --wheel --outdir artifacts/packages --no-isolation src/extensibility/python-extensibility
python -m build --wheel --outdir artifacts/package --no-isolation src/clients/python-client
python -m build --wheel --outdir artifacts/package --no-isolation src/extensibility/python-extensibility
- name: Test
run: |
Expand Down Expand Up @@ -90,7 +90,7 @@ jobs:
name: artifacts
path: |
artifacts/*.txt
artifacts/packages/
artifacts/package/
artifacts/images/
- name: Prepare GitHub Pages
Expand Down Expand Up @@ -129,12 +129,12 @@ jobs:
run: docker load --input artifacts/images/nexus_image.tar

- name: Nuget package (MyGet)
run: dotnet nuget push 'artifacts/packages/*.nupkg' --api-key ${MYGET_API_KEY} --source https://www.myget.org/F/apollo3zehn-dev/api/v3/index.json
run: dotnet nuget push 'artifacts/package/*.nupkg' --api-key ${MYGET_API_KEY} --source https://www.myget.org/F/apollo3zehn-dev/api/v3/index.json
env:
MYGET_API_KEY: ${{ secrets.MYGET_API_KEY }}

- name: Python package (MyGet)
run: 'for filePath in artifacts/packages/*.whl; do curl -k -X POST https://www.myget.org/F/apollo3zehn-dev/python/upload -H "Authorization: Bearer ${MYGET_API_KEY}" -F "data=@$filePath"; done'
run: 'for filePath in artifacts/package/*.whl; do curl -k -X POST https://www.myget.org/F/apollo3zehn-dev/python/upload -H "Authorization: Bearer ${MYGET_API_KEY}" -F "data=@$filePath"; done'
env:
MYGET_API_KEY: ${{ secrets.MYGET_API_KEY }}

Expand Down Expand Up @@ -179,12 +179,12 @@ jobs:
body_path: artifacts/tag_body.txt

- name: Nuget package (Nuget)
run: dotnet nuget push 'artifacts/packages/*.nupkg' --api-key ${NUGET_API_KEY} --source https://api.nuget.org/v3/index.json
run: dotnet nuget push 'artifacts/package/*.nupkg' --api-key ${NUGET_API_KEY} --source https://api.nuget.org/v3/index.json
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}

- name: Python Package (PyPI)
run: twine upload artifacts/packages/*.whl -u__token__ -p"${PYPI_API_KEY}"
run: twine upload artifacts/package/*.whl -u__token__ -p"${PYPI_API_KEY}"
env:
PYPI_API_KEY: ${{ secrets.PYPI_API_KEY }}

Expand Down
5 changes: 2 additions & 3 deletions src/Nexus/Services/DataService.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Buffers;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations;
using System.IO.Compression;
using System.IO.Pipelines;
using System.Security.Claims;
Expand Down Expand Up @@ -346,7 +345,7 @@ private async Task CreateFilesAsync(
}
catch
{
cts.Cancel();
await cts.CancelAsync();
throw;
}
}
Expand Down

0 comments on commit 7bacde0

Please sign in to comment.