Skip to content

Commit cab4e50

Browse files
authored
♻️ split test script in v1 and v2 (#295)
1 parent 2184f62 commit cab4e50

39 files changed

+111
-65
lines changed

.github/workflows/_test-code-samples.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,16 @@ on:
33
workflow_call:
44
workflow_dispatch:
55

6+
env:
7+
MINDEE_API_KEY: ${{ secrets.MINDEE_API_KEY_SE_TESTS }}
8+
WORKFLOW_ID: ${{ secrets.WORKFLOW_ID_SE_TESTS }}
9+
MINDEE_V2_API_KEY: ${{ secrets.MINDEE_V2_SE_TESTS_API_KEY }}
10+
MINDEE_V2_SE_TESTS_BLANK_PDF_URL: ${{ secrets.MINDEE_V2_SE_TESTS_BLANK_PDF_URL }}
11+
MINDEE_V2_SE_TESTS_FINDOC_MODEL_ID: ${{ secrets.MINDEE_V2_SE_TESTS_FINDOC_MODEL_ID }}
12+
MINDEE_V2_SE_TESTS_CLASSIFICATION_MODEL_ID: ${{ secrets.MINDEE_V2_SE_TESTS_CLASSIFICATION_MODEL_ID }}
13+
MINDEE_V2_SE_TESTS_CROP_MODEL_ID: ${{ secrets.MINDEE_V2_SE_TESTS_CROP_MODEL_ID }}
14+
MINDEE_V2_SE_TESTS_SPLIT_MODEL_ID: ${{ secrets.MINDEE_V2_SE_TESTS_SPLIT_MODEL_ID }}
15+
616
jobs:
717
test_sample_code:
818
name: Test Code Samples
@@ -31,6 +41,10 @@ jobs:
3141
- name: Install mindee-java-api
3242
run: mvn clean install -DskipTests
3343

34-
- name: Tests sample code
44+
- name: Tests v2 sample code
45+
run: |
46+
./tests/test_v2_code_samples.sh
47+
48+
- name: Tests v1 sample code
3549
run: |
36-
./tests/test_code_samples.sh ${{ secrets.MINDEE_ACCOUNT_SE_TESTS }} ${{ secrets.MINDEE_ENDPOINT_SE_TESTS }} ${{ secrets.MINDEE_API_KEY_SE_TESTS }} ${{ secrets.MINDEE_V2_SE_TESTS_API_KEY }} ${{ secrets.MINDEE_V2_SE_TESTS_FINDOC_MODEL_ID }}
50+
./tests/test_v1_code_samples.sh ${{ secrets.MINDEE_ACCOUNT_SE_TESTS }} ${{ secrets.MINDEE_ENDPOINT_SE_TESTS }}

docs/code_samples/bank_account_details_v1.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import com.mindee.product.fr.bankaccountdetails.BankAccountDetailsV1;
55
import java.io.File;
66
import java.io.IOException;
77

8-
public class SimpleMindeeClient {
8+
public class SimpleMindeeClientV1 {
99

1010
public static void main(String[] args) throws IOException {
1111
String apiKey = "my-api-key";

docs/code_samples/bank_account_details_v2.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import com.mindee.product.fr.bankaccountdetails.BankAccountDetailsV2;
55
import java.io.File;
66
import java.io.IOException;
77

8-
public class SimpleMindeeClient {
8+
public class SimpleMindeeClientV1 {
99

1010
public static void main(String[] args) throws IOException {
1111
String apiKey = "my-api-key";

docs/code_samples/bank_check_v1.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import com.mindee.product.us.bankcheck.BankCheckV1;
55
import java.io.File;
66
import java.io.IOException;
77

8-
public class SimpleMindeeClient {
8+
public class SimpleMindeeClientV1 {
99

1010
public static void main(String[] args) throws IOException {
1111
String apiKey = "my-api-key";

docs/code_samples/barcode_reader_v1.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import com.mindee.product.barcodereader.BarcodeReaderV1;
55
import java.io.File;
66
import java.io.IOException;
77

8-
public class SimpleMindeeClient {
8+
public class SimpleMindeeClientV1 {
99

1010
public static void main(String[] args) throws IOException {
1111
String apiKey = "my-api-key";

docs/code_samples/bill_of_lading_v1_async.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import com.mindee.product.billoflading.BillOfLadingV1;
55
import java.io.File;
66
import java.io.IOException;
77

8-
public class SimpleMindeeClient {
8+
public class SimpleMindeeClientV1 {
99

1010
public static void main(String[] args) throws IOException, InterruptedException {
1111
String apiKey = "my-api-key";

docs/code_samples/business_card_v1_async.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import com.mindee.product.businesscard.BusinessCardV1;
55
import java.io.File;
66
import java.io.IOException;
77

8-
public class SimpleMindeeClient {
8+
public class SimpleMindeeClientV1 {
99

1010
public static void main(String[] args) throws IOException, InterruptedException {
1111
String apiKey = "my-api-key";

docs/code_samples/carte_grise_v1.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import com.mindee.product.fr.cartegrise.CarteGriseV1;
55
import java.io.File;
66
import java.io.IOException;
77

8-
public class SimpleMindeeClient {
8+
public class SimpleMindeeClientV1 {
99

1010
public static void main(String[] args) throws IOException {
1111
String apiKey = "my-api-key";

docs/code_samples/cropper_v1.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import com.mindee.product.cropper.CropperV1;
55
import java.io.File;
66
import java.io.IOException;
77

8-
public class SimpleMindeeClient {
8+
public class SimpleMindeeClientV1 {
99

1010
public static void main(String[] args) throws IOException {
1111
String apiKey = "my-api-key";

docs/code_samples/custom_v1.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import com.mindee.http.Endpoint;
66
import java.io.File;
77
import java.io.IOException;
88

9-
public class SimpleMindeeClient {
9+
public class SimpleMindeeClientV1 {
1010

1111
public static void main(String[] args) throws IOException {
1212
String apiKey = "my-api-key";

0 commit comments

Comments
 (0)