|
1 |
| -name: Test SDKs |
| 1 | +name: Test SDKs Locally |
2 | 2 |
|
3 | 3 | on:
|
4 |
| - push: |
5 |
| - branches: |
6 |
| - - main |
| 4 | + pull_request: |
| 5 | + branches: [ "*" ] |
| 6 | + |
7 | 7 | workflow_dispatch:
|
8 | 8 |
|
9 | 9 | jobs:
|
@@ -81,31 +81,10 @@ jobs:
|
81 | 81 | path: /Users/runner/work/sdk-test-data/sdk-test-data/eppo/build/reports/androidTests/connected/index.html
|
82 | 82 |
|
83 | 83 | test-node-server-sdk:
|
84 |
| - runs-on: ubuntu-latest |
85 |
| - steps: |
86 |
| - - name: 'Check out node server SDK' |
87 |
| - uses: actions/checkout@v3 |
88 |
| - with: |
89 |
| - repository: 'Eppo-exp/node-server-sdk' |
90 |
| - - name: Use Node.js 18 |
91 |
| - uses: actions/setup-node@v1 |
92 |
| - with: |
93 |
| - node-version: '18.x' |
94 |
| - - uses: actions/cache@v2 |
95 |
| - with: |
96 |
| - path: './node_modules' |
97 |
| - key: ${{ runner.os }}-root-node-modules-${{ hashFiles('./yarn.lock') }} |
98 |
| - - name: Install root dependencies |
99 |
| - run: yarn --frozen-lockfile |
100 |
| - working-directory: ./ |
101 |
| - - name: 'Set up GCP SDK for downloading test data' |
102 |
| - uses: 'google-github-actions/setup-gcloud@v0' |
103 |
| - - name: Install sdk dependencies |
104 |
| - run: yarn --frozen-lockfile |
105 |
| - working-directory: ./ |
106 |
| - - name: Run tests |
107 |
| - run: yarn test:unit |
108 |
| - working-directory: ./ |
| 84 | + uses: Eppo-exp/node-server-sdk/.github/workflows/lint-test-sdk.yml@main |
| 85 | + with: |
| 86 | + test_data_branch: ${{ github.head_ref || github.ref_name }} |
| 87 | + sdk_branch: main |
109 | 88 |
|
110 | 89 | test-node-client-sdk:
|
111 | 90 | runs-on: ubuntu-latest
|
@@ -168,27 +147,11 @@ jobs:
|
168 | 147 | run: make test
|
169 | 148 |
|
170 | 149 | test-php-sdk:
|
171 |
| - runs-on: ubuntu-latest |
172 |
| - steps: |
173 |
| - - name: Check out PHP SDK |
174 |
| - uses: actions/checkout@v3 |
175 |
| - with: |
176 |
| - repository: 'Eppo-exp/php-sdk' |
177 |
| - - name: Validate composer.json and composer.lock |
178 |
| - run: composer validate --strict |
179 |
| - - name: Cache Composer packages |
180 |
| - id: composer-cache |
181 |
| - uses: actions/cache@v3 |
182 |
| - with: |
183 |
| - path: vendor |
184 |
| - key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} |
185 |
| - restore-keys: | |
186 |
| - ${{ runner.os }}-php- |
187 |
| - - name: Install dependencies |
188 |
| - run: composer install --prefer-dist --no-progress |
189 |
| - - name: Run tests |
190 |
| - run: make test |
191 |
| - |
| 150 | + uses: Eppo-exp/php-sdk/.github/workflows/run-tests.yml@main |
| 151 | + with: |
| 152 | + test_data_branch: ${{ github.head_ref || github.ref_name }} |
| 153 | + sdk_branch: main |
| 154 | + |
192 | 155 | test-ruby-sdk:
|
193 | 156 | runs-on: ubuntu-latest
|
194 | 157 | steps:
|
@@ -241,23 +204,9 @@ jobs:
|
241 | 204 | uses: 'google-github-actions/setup-gcloud@v0'
|
242 | 205 | - name: Run tests
|
243 | 206 | run: make test
|
244 |
| - |
| 207 | + |
245 | 208 | test-dotnet-sdk:
|
246 |
| - runs-on: ubuntu-latest |
247 |
| - steps: |
248 |
| - - name: Checkout Dot.net SDK |
249 |
| - uses: actions/checkout@v3 |
250 |
| - with: |
251 |
| - repository: 'Eppo-exp/dot-net-server-sdk' |
252 |
| - - name: Setup .NET 7 |
253 |
| - uses: actions/setup-dotnet@v3 |
254 |
| - with: |
255 |
| - dotnet-version: 7.0.x |
256 |
| - - name: Restore dependencies |
257 |
| - run: dotnet restore |
258 |
| - - name: Build |
259 |
| - run: make build |
260 |
| - - name: Pull test data |
261 |
| - run: make test-data |
262 |
| - - name: Run tests |
263 |
| - run: make test |
| 209 | + uses: Eppo-exp/dot-net-server-sdk/.github/workflows/run-tests.yml@main |
| 210 | + with: |
| 211 | + test_data_branch: ${{ github.head_ref || github.ref_name }} |
| 212 | + sdk_branch: main |
0 commit comments