diff --git a/.github/workflows/sdk_validation.yaml b/.github/workflows/sdk_validation.yaml index 477e22a..1135038 100644 --- a/.github/workflows/sdk_validation.yaml +++ b/.github/workflows/sdk_validation.yaml @@ -19,21 +19,6 @@ jobs: concurrency: group: php-sdk-check steps: - - name: Authenticate with AWS - uses: goshippo/shippo-action-workflows/.github/actions/aws_auth@v1.1.0 - with: - environment: dev-main - oidc-name: shippo-php-sdk-pipeline - login-to-ecr: false - - - name: Get Speakeasy Secrets Manager - uses: aws-actions/aws-secretsmanager-get-secrets@v2 - with: - secret-ids: | - dev-main-speakeasy-api-key - name-transformation: uppercase - parse-json-secrets: true - - name: Check out repository uses: actions/checkout@v4 @@ -56,4 +41,4 @@ jobs: - name: Check run: make check env: - SHIPPO_TOKEN: ${{ env.DEV_MAIN_SPEAKEASY_API_KEY_SHIPPO_TOKEN }} + SHIPPO_TOKEN: ${{ secrets.SHIPPO_TOKEN }} diff --git a/Makefile b/Makefile index 74378e7..6d01a3a 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,11 @@ LOCAL_SPEC_FILE=${BUILD_DIR}public-api.yaml check: test +clean: + php composer.phar clear-cache + rm -rf vendor/ + rm -f composer.lock + install: php composer.phar install diff --git a/tests/Shippo/API/AddressTest.php b/tests/Shippo/API/AddressTest.php new file mode 100644 index 0000000..48c9285 --- /dev/null +++ b/tests/Shippo/API/AddressTest.php @@ -0,0 +1,27 @@ +getSdk()->addresses->list( + page: 1, + results: 10, + shippoApiVersion: '2018-02-08' + + ); + + $this->assertEquals(200, $response->statusCode); + $this->assertNotNull($response->addressPaginatedList); + $this->assertInstanceOf(AddressPaginatedList::class, $response->addressPaginatedList); + } +} \ No newline at end of file diff --git a/tests/Shippo/API/PurchaseLabelTest.php b/tests/Shippo/API/PurchaseLabelTest.php index 0913bbf..d077a64 100644 --- a/tests/Shippo/API/PurchaseLabelTest.php +++ b/tests/Shippo/API/PurchaseLabelTest.php @@ -130,6 +130,7 @@ public function testPurchaseLabelUsingReferenceIds() ]; $transactionCreateResponse = $this->getSdk()->transactions->create($transactionCreateRequest); $this->assertNotNull($transactionCreateResponse->transaction); + $this->assertEquals(201, $transactionCreateResponse->statusCode); $transaction = $transactionCreateResponse->transaction; $this->assertInstanceOf(Transaction::class, $transaction); $this->assertIsString($transaction->rate);