Skip to content

Commit 2ea6c23

Browse files
Merge pull request #46 from localstack-dotnet/feature/v2-preview1
πŸš€ AWS SDK v4 Migration - v2.0.0-preview1 Release
2 parents 5cd4001 + 009b4c2 commit 2ea6c23

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+1757
-606
lines changed

β€Ž.github/workflows/build-macos.ymlβ€Ž

Lines changed: 0 additions & 55 deletions
This file was deleted.

β€Ž.github/workflows/build-ubuntu.ymlβ€Ž

Lines changed: 0 additions & 55 deletions
This file was deleted.

β€Ž.github/workflows/build-windows.ymlβ€Ž

Lines changed: 0 additions & 49 deletions
This file was deleted.

β€Ž.github/workflows/ci.ymlβ€Ž

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
name: "CI/CD Pipeline"
2+
3+
on:
4+
push:
5+
paths-ignore:
6+
- "**.md"
7+
- LICENSE
8+
branches:
9+
- "master"
10+
pull_request:
11+
paths-ignore:
12+
- "**.md"
13+
- LICENSE
14+
branches:
15+
- master
16+
- "feature/*"
17+
18+
env:
19+
DOTNET_CLI_TELEMETRY_OPTOUT: true
20+
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
21+
DOTNET_NOLOGO: true
22+
23+
jobs:
24+
build-and-test:
25+
name: "Build & Test (${{ matrix.name }})"
26+
runs-on: ${{ matrix.os }}
27+
env:
28+
NUGET_PACKAGES: ${{ contains(matrix.os, 'windows') && format('{0}\.nuget\packages', github.workspace) || format('{0}/.nuget/packages', github.workspace) }}
29+
30+
strategy:
31+
fail-fast: false
32+
matrix:
33+
include:
34+
- os: windows-latest
35+
name: "Windows"
36+
script: "./build.ps1"
37+
38+
- os: ubuntu-22.04
39+
name: "Linux"
40+
script: "./build.sh"
41+
42+
- os: macos-latest
43+
name: "macOS"
44+
script: "./build.sh"
45+
46+
steps:
47+
- name: "Checkout"
48+
uses: actions/checkout@v4
49+
with:
50+
fetch-depth: 0 # Full history for better caching
51+
52+
- name: "Setup .NET SDK"
53+
uses: actions/setup-dotnet@v4
54+
with:
55+
dotnet-version: |
56+
8.0.x
57+
9.0.x
58+
59+
- name: "Make build script executable"
60+
if: runner.os != 'Windows'
61+
run: chmod +x ./build.sh
62+
63+
- name: "Cache NuGet packages"
64+
uses: actions/cache@v4
65+
with:
66+
path: ${{ runner.os == 'Windows' && format('{0}\.nuget\packages', github.workspace) || format('{0}/.nuget/packages', github.workspace) }}
67+
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json', '**/*.csproj', '**/Directory.Packages.props') }}
68+
restore-keys: |
69+
${{ runner.os }}-nuget-
70+
71+
- name: "Build"
72+
run: ${{ matrix.script }} --target build
73+
74+
- name: "Run Tests"
75+
run: ${{ matrix.script }} --target tests --skipFunctionalTest ${{ runner.os == 'Linux' && 'false' || 'true' }} --exclusive
76+
77+
- name: "Publish Test Results"
78+
uses: dorny/test-reporter@v1
79+
if: success() || failure()
80+
with:
81+
name: 'Test Results (${{ matrix.name }})'
82+
path: '**/TestResults/*.trx'
83+
reporter: 'dotnet-trx'
84+
fail-on-error: true
85+
max-annotations: 50
86+
87+
- name: "Upload Test Artifacts"
88+
uses: actions/upload-artifact@v4
89+
if: failure()
90+
with:
91+
name: test-results-${{ matrix.name }}
92+
path: |
93+
**/*.trx
94+
**/TestResults/**/*
95+
retention-days: 7
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Dependency Review
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
- "feature/*"
8+
9+
permissions:
10+
contents: read
11+
pull-requests: write
12+
13+
jobs:
14+
dependency-review:
15+
name: "Dependency Review"
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: "Checkout"
19+
uses: actions/checkout@v4
20+
21+
- name: "Dependency Review"
22+
uses: actions/dependency-review-action@v4
23+
with:
24+
# Fail the check if a vulnerability with 'moderate' severity or higher is found.
25+
fail-on-severity: moderate
26+
# Always post a summary of the check as a comment on the PR.
27+
comment-summary-in-pr: always
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
name: "Auto Publish to GitHub Packages"
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
paths-ignore:
8+
- "**.md"
9+
- LICENSE
10+
- ".github/**"
11+
- "docs/**"
12+
13+
env:
14+
DOTNET_CLI_TELEMETRY_OPTOUT: true
15+
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
16+
DOTNET_NOLOGO: true
17+
18+
jobs:
19+
auto-publish:
20+
name: "Auto Publish Development Build"
21+
runs-on: ubuntu-22.04
22+
if: github.repository == 'localstack-dotnet/localstack-dotnet-client'
23+
env:
24+
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
25+
26+
permissions:
27+
contents: read
28+
packages: write
29+
30+
steps:
31+
- name: "Checkout"
32+
uses: actions/checkout@v4
33+
with:
34+
fetch-depth: 0
35+
36+
- name: "Setup .NET SDK"
37+
uses: actions/setup-dotnet@v4
38+
with:
39+
dotnet-version: |
40+
8.0.x
41+
9.0.x
42+
43+
- name: "Cache NuGet packages"
44+
uses: actions/cache@v4
45+
with:
46+
path: ${{ github.workspace }}/.nuget/packages
47+
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json', '**/*.csproj', '**/Directory.Packages.props') }}
48+
restore-keys: |
49+
${{ runner.os }}-nuget-
50+
51+
- name: "Make build script executable"
52+
run: chmod +x ./build.sh
53+
54+
- name: "Build & Test"
55+
run: ./build.sh --target tests --skipFunctionalTest true
56+
57+
- name: "Setup GitHub Packages Authentication"
58+
run: |
59+
dotnet nuget add source https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json \
60+
--name github-packages \
61+
--username ${{ github.actor }} \
62+
--password ${{ secrets.GITHUB_TOKEN }} \
63+
--store-password-in-clear-text
64+
65+
- name: "Pack & Publish LocalStack.Client"
66+
run: |
67+
echo "πŸ”¨ Building and publishing LocalStack.Client package..."
68+
./build.sh --target nuget-pack-and-publish \
69+
--package-source github \
70+
--package-id LocalStack.Client \
71+
--use-directory-props-version true \
72+
--branch-name ${{ github.ref_name }} \
73+
--package-secret ${{ secrets.GITHUB_TOKEN }}
74+
75+
- name: "Pack & Publish LocalStack.Client.Extensions"
76+
run: |
77+
echo "πŸ”¨ Building and publishing LocalStack.Client.Extensions package..."
78+
./build.sh --target nuget-pack-and-publish \
79+
--package-source github \
80+
--package-id LocalStack.Client.Extensions \
81+
--use-directory-props-version true \
82+
--branch-name ${{ github.ref_name }} \
83+
--package-secret ${{ secrets.GITHUB_TOKEN }}
84+
85+
- name: "Upload Package Artifacts"
86+
uses: actions/upload-artifact@v4
87+
with:
88+
name: "dev-packages-${{ github.run_number }}"
89+
path: |
90+
artifacts/*.nupkg
91+
artifacts/*.snupkg
92+
retention-days: 7
93+
94+
- name: "Generate Build Summary"
95+
run: |
96+
echo "πŸ“¦ Generating build summary..."
97+
./build.sh --target workflow-summary \
98+
--use-directory-props-version true \
99+
--branch-name ${{ github.ref_name }}

0 commit comments

Comments
Β (0)