-
Notifications
You must be signed in to change notification settings - Fork 13
113 lines (95 loc) · 3.84 KB
/
External-Storage-Tests.yml
File metadata and controls
113 lines (95 loc) · 3.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
name: External Storage Tests
on:
pull_request:
branches:
- 'master'
- 'release-*'
push:
branches:
- 'master'
- 'beta'
- 'release-*'
jobs:
test-external-storages:
env:
GIT_REF: ${{ github.ref }}
GIT_SHA: ${{ github.sha }}
Configuration: Release
SolutionFile: dotnet\StorageTestSolution.slnx
SolutionFileName: StorageTestSolution
runs-on: ubuntu-latest
environment: external-storage-tests
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Docker
uses: docker/setup-buildx-action@v2
- name: Start LocalStack and create S3 bucket
run: |
echo "Starting LocalStack 3.8.1..."
docker run -d -p 4566:4566 --name localstack localstack/localstack:3.8.1
echo "Waiting for LocalStack S3 service to be ready..."
for i in {1..60}; do
if curl -s http://localhost:4566/_localstack/health | grep -q '"s3"'; then
echo "LocalStack S3 is ready!"
break
fi
echo "Still waiting for S3..."
sleep 2
done
echo "LocalStack logs (last 20 lines for debug):"
docker logs --tail 20 localstack
echo "Creating test bucket in LocalStack..."
AWS_ACCESS_KEY_ID=test AWS_SECRET_ACCESS_KEY=test AWS_DEFAULT_REGION=us-east-1 \
aws --endpoint-url=http://localhost:4566 s3 mb s3://test-bucket
- name: Install .NET 8
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.x'
include-prerelease: true
- name: Install .NET 10
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Install libgdiplus
run: sudo apt-get install -y libgdiplus
- name: Create temporary solution with .NET 10 projects
run: |
dotnet new sln --name $SolutionFileName --output dotnet --force
dotnet msbuild dotnet/DotNetStandardClasses.slnx /t:DumpProjectsAndCoreTests -p:DumpSolutionName=$SolutionFileName -p:DumpSolutionExtension=slnx /m:1 -p:DumpSolutionTargetFrameworkDefault=net10
- name: Restore packages
run: dotnet restore $SolutionFile
- name: Build
run: dotnet build $SolutionFile --no-restore --configuration $Configuration
- name: Test External Storage
env:
AWSS3_TEST_ENABLED: "true"
STORAGE_AWSS3_ACCESS_KEY: "test"
STORAGE_AWSS3_SECRET_KEY: "test"
STORAGE_AWSS3_BUCKET_NAME: "test-bucket"
STORAGE_AWSS3_FOLDER_NAME: "gxclasses"
STORAGE_AWSS3_REGION: "us-east-1"
STORAGE_AWSS3_ENDPOINT: "custom"
S3_SKIP_URL_SIGNATURE_TEST: "true"
STORAGE_AWSS3_CUSTOM_ENDPOINT: "http://localhost:4566"
IBMCOS_TEST_ENABLED: "true"
STORAGE_IBMCOS_ACCESS_KEY: "${{ secrets.IBMCOS_ACCESS_KEY }}"
STORAGE_IBMCOS_SECRET_KEY: "${{ secrets.IBMCOS_SECRET_KEY }}"
STORAGE_IBMCOS_BUCKET_NAME: "gxclasses-unit-tests"
STORAGE_IBMCOS_FOLDER_NAME: "tests"
STORAGE_IBMCOS_REGION: "us-south"
AZUREBS_TEST_ENABLED: "true"
STORAGE_AZUREBS_ACCESS_KEY: "${{ secrets.AZUREBS_ACCESS_KEY }}"
STORAGE_AZUREBS_ACCOUNT_NAME: "${{ secrets.AZUREBS_ACCOUNT_NAME }}"
STORAGE_AZUREBS_FOLDER_NAME: "tests"
STORAGE_AZUREBS_PUBLIC_CONTAINER_NAME: "contluispublic"
STORAGE_AZUREBS_PRIVATE_CONTAINER_NAME: "contluisprivate"
GOOGLECS_TEST_ENABLED: "true"
STORAGE_GOOGLECS_KEY: '${{ secrets.GOOGLECS_KEY }}'
STORAGE_GOOGLECS_PROJECT_ID: "gxjavacloudstorageunittests"
STORAGE_GOOGLECS_BUCKET_NAME: "javaclasses-unittests"
STORAGE_GOOGLECS_FOLDER_NAME: "gxclasses"
STORAGE_GOOGLECS_APPLICATION_NAME: "gxjavacloudstorageunittests"
run: dotnet test $SolutionFile --no-restore --no-build --configuration $Configuration