Skip to content

Commit cee60aa

Browse files
chore: modify testing setting before test step
1 parent cb51ac5 commit cee60aa

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

.github/workflows/github-cicd.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,17 @@ jobs:
4040
dotnet restore --locked-mode
4141
- name: Build
4242
run: dotnet build --configuration Release --no-restore
43+
- name: App Settings Variable Substitution
44+
uses: microsoft/variable-substitution@v1
45+
with:
46+
files: "${{env.DOTNET_ROOT}}/src/Api/appsettings.Testing-Deployment.json"
47+
env:
48+
DatabaseSettings.DatabaseConnection: ${{secrets.DB_CONNECTION_STRING}}
49+
S3AwsSettings.AccessKey: ${{ secrets.S3_KEY }}
50+
S3AwsSettings.SecretKey: ${{ secrets.S3_SECRET }}
51+
SecuritySettings.JwtSettings.SecretKey: ${{ secrets.JWT_SECRET }}
4352
- name: Test
44-
run: dotnet test --no-restore --verbosity normal -e ASPNETCORE_ENVIRONMENT=Deployment -e DatabaseSettings__DatabaseConnection=${{secrets.DB_CONNECTION_STRING}} -e S3AwsSettings__AccessKey=${{ secrets.S3_KEY }} -e S3AwsSettings__SecretKey=${{ secrets.S3_SECRET }} -e SecuritySettings__JwtSettings__SecretKey=${{ secrets.JWT_SECRET }}
53+
run: dotnet test --no-restore --verbosity normal -e ASPNETCORE_ENVIRONMENT=Deployment
4554
- name: Publish Application
4655
run: dotnet publish -c Release --property:PublishDir=${{ github.workspace }}/app/publish
4756
- name: Upload artifact

0 commit comments

Comments
 (0)