diff --git a/.github/workflows/build-authorisation-adjustment.yml b/.github/workflows/build-authorisation-adjustment.yml new file mode 100644 index 0000000..0233e17 --- /dev/null +++ b/.github/workflows/build-authorisation-adjustment.yml @@ -0,0 +1,32 @@ +name: Build Authorisation Adjustment + +on: + workflow_dispatch: + push: + branches: [ main ] + paths: + - 'authorisation-adjustment-example/**' + pull_request: + branches: [ main ] + paths: + - 'authorisation-adjustment-example/**' + +jobs: + + build-authorisation-adjustment: + runs-on: ubuntu-latest + strategy: + matrix: + java: [ '17' ] + name: authorisation-adjustment-example build with Java ${{ matrix.Java }} + steps: + - uses: actions/checkout@v3 + - name: Setup java + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: ${{ matrix.java }} + - name: Grant execute permission for gradlew + run: chmod +x authorisation-adjustment-example/gradlew + - name: Build with Gradle + run: cd authorisation-adjustment-example; ./gradlew build diff --git a/.github/workflows/build-checkout-advanced.yml b/.github/workflows/build-checkout-advanced.yml new file mode 100644 index 0000000..ad5e594 --- /dev/null +++ b/.github/workflows/build-checkout-advanced.yml @@ -0,0 +1,32 @@ +name: Build Checkout Advanced + +on: + workflow_dispatch: + push: + branches: [ main ] + paths: + - 'checkout-example-advanced/**' + pull_request: + branches: [ main ] + paths: + - 'checkout-example-advanced/**' + +jobs: + + build-checkout-advanced: + runs-on: ubuntu-latest + strategy: + matrix: + java: [ '17' ] + name: checkout-example-advanced build with Java ${{ matrix.Java }} + steps: + - uses: actions/checkout@v3 + - name: Setup java + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: ${{ matrix.java }} + - name: Grant checkout-example-advanced execute permission for gradlew + run: chmod +x checkout-example-advanced/gradlew + - name: Build checkout-example-advanced with Gradle + run: cd checkout-example-advanced; ./gradlew build \ No newline at end of file diff --git a/.github/workflows/build-checkout.yml b/.github/workflows/build-checkout.yml new file mode 100644 index 0000000..f50022f --- /dev/null +++ b/.github/workflows/build-checkout.yml @@ -0,0 +1,31 @@ +name: Build Checkout + +on: + workflow_dispatch: + push: + branches: [ main ] + paths: + - 'checkout-example/**' + pull_request: + branches: [ main ] + paths: + - 'checkout-example/**' + +jobs: + build-checkout: + runs-on: ubuntu-latest + strategy: + matrix: + java: [ '17' ] + name: checkout-example build with Java ${{ matrix.Java }} + steps: + - uses: actions/checkout@v3 + - name: Setup java + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: ${{ matrix.java }} + - name: Grant checkout-example execute permission for gradlew + run: chmod +x checkout-example/gradlew + - name: Build checkout-example with Gradle + run: cd checkout-example; ./gradlew build diff --git a/.github/workflows/build-giftcard.yml b/.github/workflows/build-giftcard.yml new file mode 100644 index 0000000..e3f0b26 --- /dev/null +++ b/.github/workflows/build-giftcard.yml @@ -0,0 +1,32 @@ +name: Build Giftcard + +on: + workflow_dispatch: + push: + branches: [ main ] + paths: + - 'giftcard-example/**' + pull_request: + branches: [ main ] + paths: + - 'giftcard-example/**' + +jobs: + + build-giftcard: + runs-on: ubuntu-latest + strategy: + matrix: + java: [ '17' ] + name: giftcard-example build with Java ${{ matrix.Java }} + steps: + - uses: actions/checkout@v3 + - name: Setup java + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: ${{ matrix.java }} + - name: Grant giftcard-example execute permission for gradlew + run: chmod +x giftcard-example/gradlew + - name: Build giftcard-example with Gradle + run: cd giftcard-example; ./gradlew build diff --git a/.github/workflows/build-giving.yml b/.github/workflows/build-giving.yml new file mode 100644 index 0000000..ad6a3d8 --- /dev/null +++ b/.github/workflows/build-giving.yml @@ -0,0 +1,33 @@ +name: Build Giving + +on: + workflow_dispatch: + push: + branches: [ main ] + paths: + - 'giving-example/**' + pull_request: + branches: [ main ] + paths: + - 'giving-example/**' + +jobs: + + build-giving: + runs-on: ubuntu-latest + strategy: + matrix: + java: [ '17' ] + name: giving-example build with Java ${{ matrix.Java }} + steps: + - uses: actions/checkout@v3 + - name: Setup java + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: ${{ matrix.java }} + - name: Grant execute permission for gradlew + run: chmod +x giving-example/gradlew + - name: Build with Gradle + run: cd giving-example; ./gradlew build + diff --git a/.github/workflows/build-in-person-payments.yml b/.github/workflows/build-in-person-payments.yml new file mode 100644 index 0000000..b1db4a1 --- /dev/null +++ b/.github/workflows/build-in-person-payments.yml @@ -0,0 +1,33 @@ +name: Build In-Person Payments + +on: + workflow_dispatch: + push: + branches: [ main ] + paths: + - 'in-person-payments-example/**' + pull_request: + branches: [ main ] + paths: + - 'in-person-payments-example/**' + +jobs: + + build-in-person-payments: + runs-on: ubuntu-latest + strategy: + matrix: + java: [ '17' ] + name: in-person-payments-example build with Java ${{ matrix.Java }} + steps: + - uses: actions/checkout@v3 + - name: Setup java + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: ${{ matrix.java }} + - name: Grant execute permission for gradlew + run: chmod +x in-person-payments-example/gradlew + - name: Build with Gradle + run: cd in-person-payments-example; ./gradlew build + diff --git a/.github/workflows/build-paybylink.yml b/.github/workflows/build-paybylink.yml new file mode 100644 index 0000000..0fc97c9 --- /dev/null +++ b/.github/workflows/build-paybylink.yml @@ -0,0 +1,33 @@ +name: Build PayByLink + +on: + workflow_dispatch: + push: + branches: [ main ] + paths: + - 'paybylink-example/**' + pull_request: + branches: [ main ] + paths: + - 'paybylink-example/**' + +jobs: + + build-paybylinks: + runs-on: ubuntu-latest + strategy: + matrix: + java: [ '17' ] + name: paybylink-example build with Java ${{ matrix.Java }} + steps: + - uses: actions/checkout@v3 + - name: Setup java + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: ${{ matrix.java }} + - name: Grant execute permission for gradlew + run: chmod +x paybylink-example/gradlew + - name: Build with Gradle + run: cd paybylink-example; ./gradlew build + diff --git a/.github/workflows/build-subscription.yml b/.github/workflows/build-subscription.yml new file mode 100644 index 0000000..a4c0870 --- /dev/null +++ b/.github/workflows/build-subscription.yml @@ -0,0 +1,32 @@ +name: Build Subscription + +on: + workflow_dispatch: + push: + branches: [ main ] + paths: + - 'subscription-example/**' + pull_request: + branches: [ main ] + paths: + - 'subscription-example/**' + +jobs: + + build-subscription: + runs-on: ubuntu-latest + strategy: + matrix: + java: [ '17' ] + name: subscription-example build with Java ${{ matrix.Java }} + steps: + - uses: actions/checkout@v3 + - name: Setup java + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: ${{ matrix.java }} + - name: Grant execute permission for gradlew + run: chmod +x subscription-example/gradlew + - name: Build with Gradle + run: cd subscription-example; ./gradlew build diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index f476912..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,145 +0,0 @@ -name: Java CI with Gradle - -on: - push: - branches: [ main ] - paths-ignore: - - '**/README.md' - - README.md - - .gitignore - - .gitpod.yml - - LICENSE - pull_request: - branches: [ main ] - paths-ignore: - - '**/README.md' - - README.md - - .gitignore - - .gitpod.yml - - LICENSE - -jobs: - build-checkout: - runs-on: ubuntu-latest - strategy: - matrix: - java: [ '17' ] - name: checkout-example build with Java ${{ matrix.Java }} - steps: - - uses: actions/checkout@v3 - - name: Setup java - uses: actions/setup-java@v3 - with: - distribution: 'temurin' - java-version: ${{ matrix.java }} - - name: Grant checkout-example execute permission for gradlew - run: chmod +x checkout-example/gradlew - - name: Build checkout-example with Gradle - run: cd checkout-example; ./gradlew build - build-checkout-advanced: - runs-on: ubuntu-latest - strategy: - matrix: - java: [ '17' ] - name: checkout-example-advanced build with Java ${{ matrix.Java }} - steps: - - uses: actions/checkout@v3 - - name: Setup java - uses: actions/setup-java@v3 - with: - distribution: 'temurin' - java-version: ${{ matrix.java }} - - name: Grant checkout-example-advanced execute permission for gradlew - run: chmod +x checkout-example-advanced/gradlew - - name: Build checkout-example-advanced with Gradle - run: cd checkout-example-advanced; ./gradlew build - - build-giftcard: - runs-on: ubuntu-latest - strategy: - matrix: - java: [ '17' ] - name: giftcard-example build with Java ${{ matrix.Java }} - steps: - - uses: actions/checkout@v3 - - name: Setup java - uses: actions/setup-java@v3 - with: - distribution: 'temurin' - java-version: ${{ matrix.java }} - - name: Grant giftcard-example execute permission for gradlew - run: chmod +x giftcard-example/gradlew - - name: Build giftcard-example with Gradle - run: cd giftcard-example; ./gradlew build - - build-subscription: - runs-on: ubuntu-latest - strategy: - matrix: - java: [ '17' ] - name: subscription-example build with Java ${{ matrix.Java }} - steps: - - uses: actions/checkout@v3 - - name: Setup java - uses: actions/setup-java@v3 - with: - distribution: 'temurin' - java-version: ${{ matrix.java }} - - name: Grant execute permission for gradlew - run: chmod +x subscription-example/gradlew - - name: Build with Gradle - run: cd subscription-example; ./gradlew build - - build-paybylinks: - runs-on: ubuntu-latest - strategy: - matrix: - java: [ '17' ] - name: paybylink-example build with Java ${{ matrix.Java }} - steps: - - uses: actions/checkout@v3 - - name: Setup java - uses: actions/setup-java@v3 - with: - distribution: 'temurin' - java-version: ${{ matrix.java }} - - name: Grant execute permission for gradlew - run: chmod +x paybylink-example/gradlew - - name: Build with Gradle - run: cd paybylink-example; ./gradlew build - - build-giving: - runs-on: ubuntu-latest - strategy: - matrix: - java: [ '17' ] - name: giving-example build with Java ${{ matrix.Java }} - steps: - - uses: actions/checkout@v3 - - name: Setup java - uses: actions/setup-java@v3 - with: - distribution: 'temurin' - java-version: ${{ matrix.java }} - - name: Grant execute permission for gradlew - run: chmod +x giving-example/gradlew - - name: Build with Gradle - run: cd giving-example; ./gradlew build - - build-authorisation-adjustment: - runs-on: ubuntu-latest - strategy: - matrix: - java: [ '17' ] - name: authorisation-adjustment-example build with Java ${{ matrix.Java }} - steps: - - uses: actions/checkout@v3 - - name: Setup java - uses: actions/setup-java@v3 - with: - distribution: 'temurin' - java-version: ${{ matrix.java }} - - name: Grant execute permission for gradlew - run: chmod +x authorisation-adjustment-example/gradlew - - name: Build with Gradle - run: cd authorisation-adjustment-example; ./gradlew build diff --git a/.github/workflows/e2e-authorisation-adjustment.yml b/.github/workflows/e2e-authorisation-adjustment.yml new file mode 100644 index 0000000..a85a8d3 --- /dev/null +++ b/.github/workflows/e2e-authorisation-adjustment.yml @@ -0,0 +1,37 @@ +name: E2E Authorisation Adjustment + +on: + workflow_dispatch: + push: + branches: [ main ] + paths: + - 'authorisation-adjustment-example/**' + pull_request: + branches: [ main ] + paths: + - 'authorisation-adjustment-example/**' + +jobs: + + authorisation-adjustment: + runs-on: ubuntu-latest + steps: + - name: Authorisation Adjustment project + uses: actions/checkout@v3 + - name: Setup java + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: 17 + - name: Grant execute permission for gradlew + run: chmod +x authorisation-adjustment-example/gradlew + - name: Build authorisation-adjustment-example with Gradle + run: cd authorisation-adjustment-example; ./gradlew build + - name: Build authorisation-adjustment-example image + run: docker build -t authorisation-adjustment-example:latest authorisation-adjustment-example + - name: Start authorisation-adjustment container + run: docker run --rm -d --name authorisation-adjustment-example -p 8080:8080 -e ADYEN_API_KEY="${{ secrets.ADYEN_API_KEY }}" -e ADYEN_MERCHANT_ACCOUNT=${{ secrets.ADYEN_MERCHANT_ACCOUNT }} -e ADYEN_CLIENT_KEY=${{ secrets.ADYEN_CLIENT_KEY }} -e ADYEN_HMAC_KEY=${{ secrets.ADYEN_HMAC_KEY }} authorisation-adjustment-example:latest + - name: Run testing suite + run: docker run --rm --name adyen-testing-suite -e PLAYWRIGHT_FOLDERNAME=authorisation-adjustment -e ADYEN_HMAC_KEY=${{ secrets.ADYEN_HMAC_KEY }} --network host ghcr.io/adyen-examples/adyen-testing-suite:main + + diff --git a/.github/workflows/e2e-checkout-advanced.yml b/.github/workflows/e2e-checkout-advanced.yml new file mode 100644 index 0000000..0b14c84 --- /dev/null +++ b/.github/workflows/e2e-checkout-advanced.yml @@ -0,0 +1,35 @@ +name: E2E Checkout Advanced + +on: + workflow_dispatch: + push: + branches: [ main ] + paths: + - 'checkout-example-advanced/**' + pull_request: + branches: [ main ] + paths: + - 'checkout-example-advanced/**' + +jobs: + + checkout-advanced: + runs-on: ubuntu-latest + steps: + - name: Checkout project + uses: actions/checkout@v3 + - name: Setup java + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: 17 + - name: Grant execute permission for gradlew + run: chmod +x checkout-example-advanced/gradlew + - name: Build checkout-example-advanced with Gradle + run: cd checkout-example-advanced; ./gradlew build + - name: Build checkout-example-advanced image + run: docker build -t checkout-example-advanced:latest checkout-example-advanced + - name: Start checkout-example-advanced container + run: docker run --rm -d --name checkout-example-advanced -p 8080:8080 -e ADYEN_API_KEY="${{ secrets.ADYEN_API_KEY }}" -e ADYEN_MERCHANT_ACCOUNT=${{ secrets.ADYEN_MERCHANT_ACCOUNT }} -e ADYEN_CLIENT_KEY=${{ secrets.ADYEN_CLIENT_KEY }} -e ADYEN_HMAC_KEY=${{ secrets.ADYEN_HMAC_KEY }} checkout-example-advanced:latest + - name: Run testing suite + run: docker run --rm --name adyen-testing-suite -e PLAYWRIGHT_FOLDERNAME=advanced-checkout -e ADYEN_HMAC_KEY=${{ secrets.ADYEN_HMAC_KEY }} --network host ghcr.io/adyen-examples/adyen-testing-suite:main diff --git a/.github/workflows/e2e-checkout.yml b/.github/workflows/e2e-checkout.yml new file mode 100644 index 0000000..1f13b1f --- /dev/null +++ b/.github/workflows/e2e-checkout.yml @@ -0,0 +1,34 @@ +name: E2E Checkout + +on: + workflow_dispatch: + push: + branches: [ main ] + paths: + - 'checkout-example/**' + pull_request: + branches: [ main ] + paths: + - 'checkout-example/**' + +jobs: + checkout: + runs-on: ubuntu-latest + steps: + - name: Checkout project + uses: actions/checkout@v3 + - name: Setup java + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: 17 + - name: Grant execute permission for gradlew + run: chmod +x checkout-example/gradlew + - name: Build checkout-example with Gradle + run: cd checkout-example; ./gradlew build + - name: Build checkout-example image + run: docker build -t checkout-example:latest checkout-example + - name: Start checkout-example container + run: docker run --rm -d --name checkout-example -p 8080:8080 -e ADYEN_API_KEY="${{ secrets.ADYEN_API_KEY }}" -e ADYEN_MERCHANT_ACCOUNT=${{ secrets.ADYEN_MERCHANT_ACCOUNT }} -e ADYEN_CLIENT_KEY=${{ secrets.ADYEN_CLIENT_KEY }} -e ADYEN_HMAC_KEY=${{ secrets.ADYEN_HMAC_KEY }} checkout-example:latest + - name: Run testing suite + run: docker run --rm --name adyen-testing-suite -e PLAYWRIGHT_FOLDERNAME=checkout -e ADYEN_HMAC_KEY=${{ secrets.ADYEN_HMAC_KEY }} --network host ghcr.io/adyen-examples/adyen-testing-suite:main diff --git a/.github/workflows/e2e-giftcard.yml b/.github/workflows/e2e-giftcard.yml new file mode 100644 index 0000000..a8d1fd1 --- /dev/null +++ b/.github/workflows/e2e-giftcard.yml @@ -0,0 +1,36 @@ +name: E2E Giftcard + +on: + workflow_dispatch: + push: + branches: [ main ] + paths: + - 'giftcard-example/**' + pull_request: + branches: [ main ] + paths: + - 'giftcard-example/**' + +jobs: + + giftcard: + runs-on: ubuntu-latest + steps: + - name: Checkout project + uses: actions/checkout@v3 + - name: Setup java + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: 17 + - name: Grant execute permission for gradlew + run: chmod +x giftcard-example/gradlew + - name: Build giftcard-example with Gradle + run: cd giftcard-example; ./gradlew build + - name: Build giftcard-example image + run: docker build -t giftcard-example:latest giftcard-example + - name: Start giftcard-example container + run: docker run --rm -d --name giftcard-example -p 8080:8080 -e ADYEN_API_KEY="${{ secrets.ADYEN_API_KEY }}" -e ADYEN_MERCHANT_ACCOUNT=${{ secrets.ADYEN_MERCHANT_ACCOUNT }} -e ADYEN_CLIENT_KEY=${{ secrets.ADYEN_CLIENT_KEY }} -e ADYEN_HMAC_KEY=${{ secrets.ADYEN_HMAC_KEY }} giftcard-example:latest + - name: Run testing suite + run: docker run --rm --name adyen-testing-suite -e PLAYWRIGHT_FOLDERNAME=giftcard -e ADYEN_HMAC_KEY=${{ secrets.ADYEN_HMAC_KEY }} --network host ghcr.io/adyen-examples/adyen-testing-suite:main + diff --git a/.github/workflows/e2e-giving.yml b/.github/workflows/e2e-giving.yml new file mode 100644 index 0000000..93f66ef --- /dev/null +++ b/.github/workflows/e2e-giving.yml @@ -0,0 +1,37 @@ +name: E2E Giving + +on: + workflow_dispatch: + push: + branches: [ main ] + paths: + - 'giving-example/**' + pull_request: + branches: [ main ] + paths: + - 'giving-example/**' + +jobs: + + giving: + runs-on: ubuntu-latest + steps: + - name: Giving project + uses: actions/checkout@v3 + - name: Setup java + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: 17 + - name: Grant execute permission for gradlew + run: chmod +x giving-example/gradlew + - name: Build giving-example with Gradle + run: cd giving-example; ./gradlew build + - name: Build giving-example image + run: docker build -t giving-example:latest giving-example + - name: Start giving-example container + run: docker run --rm -d --name giving-example -p 8080:8080 -e ADYEN_API_KEY="${{ secrets.ADYEN_API_KEY }}" -e ADYEN_MERCHANT_ACCOUNT=${{ secrets.ADYEN_MERCHANT_ACCOUNT }} -e ADYEN_CLIENT_KEY=${{ secrets.ADYEN_CLIENT_KEY }} -e ADYEN_HMAC_KEY=${{ secrets.ADYEN_HMAC_KEY }} giving-example:latest + - name: Run testing suite + run: docker run --rm --name adyen-testing-suite -e PLAYWRIGHT_FOLDERNAME=giving -e ADYEN_HMAC_KEY=${{ secrets.ADYEN_HMAC_KEY }} --network host ghcr.io/adyen-examples/adyen-testing-suite:main + + diff --git a/.github/workflows/e2e-in-person-payments.yml b/.github/workflows/e2e-in-person-payments.yml new file mode 100644 index 0000000..4e611d2 --- /dev/null +++ b/.github/workflows/e2e-in-person-payments.yml @@ -0,0 +1,37 @@ +name: E2E In-Person Payments + +on: + workflow_dispatch: + push: + branches: [ main ] + paths: + - 'in-person-payments-example/**' + pull_request: + branches: [ main ] + paths: + - 'in-person-payments-example/**' + +jobs: + + in-person-payments: + runs-on: ubuntu-latest + steps: + - name: In-person Payments project + uses: actions/checkout@v3 + - name: Setup java + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: 17 + - name: Grant execute permission for gradlew + run: chmod +x in-person-payments-example/gradlew + - name: Build in-person-payments-example with Gradle + run: cd in-person-payments-example; ./gradlew build + - name: Build in-person-payments-example image + run: docker build -t in-person-payments-example-image:latest in-person-payments-example + - name: Start in-person-payments-example container, set ADYEN_TERMINAL_API_CLOUD_ENDPOINT to default docker bridge and port 3000 + run: docker run --rm -d --name in-person-payments-example-image -p 8080:8080 -e ADYEN_API_KEY="${{ secrets.ADYEN_API_KEY }}" -e ADYEN_HMAC_KEY=${{ secrets.ADYEN_HMAC_KEY }} -e ADYEN_TERMINAL_API_CLOUD_ENDPOINT=http://172.17.0.1:3000 -e ADYEN_POS_POI_ID=V400m-123456789 in-person-payments-example-image:latest + - name: Start the Adyen Mock Terminal API Application on port 3000 + run: docker run --rm -d --name adyen-mock-terminal-api -p 3000:3000 -e PORT=3000 ghcr.io/adyen-examples/adyen-mock-terminal-api:main + - name: Run testing suite against in-person-payments-example-image + run: docker run --rm --name adyen-testing-suite -e ADYEN_HMAC_KEY=${{ secrets.ADYEN_HMAC_KEY }} -e PLAYWRIGHT_FOLDERNAME=in-person-payments --network host ghcr.io/adyen-examples/adyen-testing-suite:main diff --git a/.github/workflows/e2e-paybylink.yml b/.github/workflows/e2e-paybylink.yml new file mode 100644 index 0000000..225e9ab --- /dev/null +++ b/.github/workflows/e2e-paybylink.yml @@ -0,0 +1,35 @@ +name: E2E PayByLink + +on: + workflow_dispatch: + push: + branches: [ main ] + paths: + - 'paybylink-example/**' + pull_request: + branches: [ main ] + paths: + - 'paybylink-example/**' + +jobs: + paybylink: + runs-on: ubuntu-latest + steps: + - name: Checkout project + uses: actions/checkout@v3 + - name: Setup java + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: 17 + - name: Grant execute permission for gradlew + run: chmod +x paybylink-example/gradlew + - name: Build paybylink-example with Gradle + run: cd paybylink-example; ./gradlew build + - name: Build paybylink-example image + run: docker build -t paybylink-example:latest paybylink-example + - name: Start paybylink-example container + run: docker run --rm -d --name paybylink-example -p 8080:8080 -e ADYEN_API_KEY="${{ secrets.ADYEN_API_KEY }}" -e ADYEN_MERCHANT_ACCOUNT=${{ secrets.ADYEN_MERCHANT_ACCOUNT }} -e ADYEN_CLIENT_KEY=${{ secrets.ADYEN_CLIENT_KEY }} -e ADYEN_HMAC_KEY=${{ secrets.ADYEN_HMAC_KEY }} paybylink-example:latest + - name: Run testing suite + run: docker run --rm --name adyen-testing-suite -e PLAYWRIGHT_FOLDERNAME=paybylink -e ADYEN_HMAC_KEY=${{ secrets.ADYEN_HMAC_KEY }} --network host ghcr.io/adyen-examples/adyen-testing-suite:main + diff --git a/.github/workflows/e2e-subscription.yml b/.github/workflows/e2e-subscription.yml new file mode 100644 index 0000000..6ffe142 --- /dev/null +++ b/.github/workflows/e2e-subscription.yml @@ -0,0 +1,36 @@ +name: E2E Subscription + +on: + workflow_dispatch: + push: + branches: [ main ] + paths: + - 'subscription-example/**' + pull_request: + branches: [ main ] + paths: + - 'subscription-example/**' + +jobs: + + subscription: + runs-on: ubuntu-latest + steps: + - name: Subscription project + uses: actions/checkout@v3 + - name: Setup java + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: 17 + - name: Grant execute permission for gradlew + run: chmod +x subscription-example/gradlew + - name: Build subscription-example with Gradle + run: cd subscription-example; ./gradlew build + - name: Build subscription-example image + run: docker build -t subscription-example:latest subscription-example + - name: Start subscription-example container + run: docker run --rm -d --name subscription-example -p 8080:8080 -e ADYEN_API_KEY="${{ secrets.ADYEN_API_KEY }}" -e ADYEN_MERCHANT_ACCOUNT=${{ secrets.ADYEN_MERCHANT_ACCOUNT }} -e ADYEN_CLIENT_KEY=${{ secrets.ADYEN_CLIENT_KEY }} -e ADYEN_HMAC_KEY=${{ secrets.ADYEN_HMAC_KEY }} subscription-example:latest + - name: Run testing suite + run: docker run --rm --name adyen-testing-suite -e PLAYWRIGHT_FOLDERNAME=subscription -e ADYEN_HMAC_KEY=${{ secrets.ADYEN_HMAC_KEY }} --network host ghcr.io/adyen-examples/adyen-testing-suite:main + diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml deleted file mode 100644 index da8b984..0000000 --- a/.github/workflows/e2e.yml +++ /dev/null @@ -1,172 +0,0 @@ -name: E2E (Playwright) - -on: - workflow_dispatch: - push: - branches: [ main ] - paths-ignore: - - '**/README.md' - - README.md - - .gitignore - - .gitpod.yml - - LICENSE - pull_request: - branches: [ main ] - paths-ignore: - - '**/README.md' - - README.md - - .gitignore - - .gitpod.yml - - LICENSE - -jobs: - checkout: - runs-on: ubuntu-latest - steps: - - name: Checkout project - uses: actions/checkout@v3 - - name: Setup java - uses: actions/setup-java@v3 - with: - distribution: 'temurin' - java-version: 17 - - name: Grant execute permission for gradlew - run: chmod +x checkout-example/gradlew - - name: Build checkout-example with Gradle - run: cd checkout-example; ./gradlew build - - name: Build checkout-example image - run: docker build -t checkout-example:latest checkout-example - - name: Start checkout-example container - run: docker run --rm -d --name checkout-example -p 8080:8080 -e ADYEN_API_KEY="${{ secrets.ADYEN_API_KEY }}" -e ADYEN_MERCHANT_ACCOUNT=${{ secrets.ADYEN_MERCHANT_ACCOUNT }} -e ADYEN_CLIENT_KEY=${{ secrets.ADYEN_CLIENT_KEY }} -e ADYEN_HMAC_KEY=${{ secrets.ADYEN_HMAC_KEY }} checkout-example:latest - - name: Run testing suite - run: docker run --rm --name adyen-testing-suite -e PLAYWRIGHT_FOLDERNAME=checkout -e ADYEN_HMAC_KEY=${{ secrets.ADYEN_HMAC_KEY }} --network host ghcr.io/adyen-examples/adyen-testing-suite:main - - checkout-advanced: - runs-on: ubuntu-latest - steps: - - name: Checkout project - uses: actions/checkout@v3 - - name: Setup java - uses: actions/setup-java@v3 - with: - distribution: 'temurin' - java-version: 17 - - name: Grant execute permission for gradlew - run: chmod +x checkout-example-advanced/gradlew - - name: Build checkout-example-advanced with Gradle - run: cd checkout-example-advanced; ./gradlew build - - name: Build checkout-example-advanced image - run: docker build -t checkout-example-advanced:latest checkout-example-advanced - - name: Start checkout-example-advanced container - run: docker run --rm -d --name checkout-example-advanced -p 8080:8080 -e ADYEN_API_KEY="${{ secrets.ADYEN_API_KEY }}" -e ADYEN_MERCHANT_ACCOUNT=${{ secrets.ADYEN_MERCHANT_ACCOUNT }} -e ADYEN_CLIENT_KEY=${{ secrets.ADYEN_CLIENT_KEY }} -e ADYEN_HMAC_KEY=${{ secrets.ADYEN_HMAC_KEY }} checkout-example-advanced:latest - - name: Run testing suite - run: docker run --rm --name adyen-testing-suite -e PLAYWRIGHT_FOLDERNAME=advanced-checkout -e ADYEN_HMAC_KEY=${{ secrets.ADYEN_HMAC_KEY }} --network host ghcr.io/adyen-examples/adyen-testing-suite:main - - giftcard: - runs-on: ubuntu-latest - steps: - - name: Checkout project - uses: actions/checkout@v3 - - name: Setup java - uses: actions/setup-java@v3 - with: - distribution: 'temurin' - java-version: 17 - - name: Grant execute permission for gradlew - run: chmod +x giftcard-example/gradlew - - name: Build giftcard-example with Gradle - run: cd giftcard-example; ./gradlew build - - name: Build giftcard-example image - run: docker build -t giftcard-example:latest giftcard-example - - name: Start giftcard-example container - run: docker run --rm -d --name giftcard-example -p 8080:8080 -e ADYEN_API_KEY="${{ secrets.ADYEN_API_KEY }}" -e ADYEN_MERCHANT_ACCOUNT=${{ secrets.ADYEN_MERCHANT_ACCOUNT }} -e ADYEN_CLIENT_KEY=${{ secrets.ADYEN_CLIENT_KEY }} -e ADYEN_HMAC_KEY=${{ secrets.ADYEN_HMAC_KEY }} giftcard-example:latest - - name: Run testing suite - run: docker run --rm --name adyen-testing-suite -e PLAYWRIGHT_FOLDERNAME=giftcard -e ADYEN_HMAC_KEY=${{ secrets.ADYEN_HMAC_KEY }} --network host ghcr.io/adyen-examples/adyen-testing-suite:main - - subscription: - runs-on: ubuntu-latest - steps: - - name: Subscription project - uses: actions/checkout@v3 - - name: Setup java - uses: actions/setup-java@v3 - with: - distribution: 'temurin' - java-version: 17 - - name: Grant execute permission for gradlew - run: chmod +x subscription-example/gradlew - - name: Build subscription-example with Gradle - run: cd subscription-example; ./gradlew build - - name: Build subscription-example image - run: docker build -t subscription-example:latest subscription-example - - name: Start subscription-example container - run: docker run --rm -d --name subscription-example -p 8080:8080 -e ADYEN_API_KEY="${{ secrets.ADYEN_API_KEY }}" -e ADYEN_MERCHANT_ACCOUNT=${{ secrets.ADYEN_MERCHANT_ACCOUNT }} -e ADYEN_CLIENT_KEY=${{ secrets.ADYEN_CLIENT_KEY }} -e ADYEN_HMAC_KEY=${{ secrets.ADYEN_HMAC_KEY }} subscription-example:latest - - name: Run testing suite - run: docker run --rm --name adyen-testing-suite -e PLAYWRIGHT_FOLDERNAME=subscription -e ADYEN_HMAC_KEY=${{ secrets.ADYEN_HMAC_KEY }} --network host ghcr.io/adyen-examples/adyen-testing-suite:main - - giving: - runs-on: ubuntu-latest - steps: - - name: Giving project - uses: actions/checkout@v3 - - name: Setup java - uses: actions/setup-java@v3 - with: - distribution: 'temurin' - java-version: 17 - - name: Grant execute permission for gradlew - run: chmod +x giving-example/gradlew - - name: Build giving-example with Gradle - run: cd giving-example; ./gradlew build - - name: Build giving-example image - run: docker build -t giving-example:latest giving-example - - name: Start giving-example container - run: docker run --rm -d --name giving-example -p 8080:8080 -e ADYEN_API_KEY="${{ secrets.ADYEN_API_KEY }}" -e ADYEN_MERCHANT_ACCOUNT=${{ secrets.ADYEN_MERCHANT_ACCOUNT }} -e ADYEN_CLIENT_KEY=${{ secrets.ADYEN_CLIENT_KEY }} -e ADYEN_HMAC_KEY=${{ secrets.ADYEN_HMAC_KEY }} giving-example:latest - - name: Run testing suite - run: docker run --rm --name adyen-testing-suite -e PLAYWRIGHT_FOLDERNAME=giving -e ADYEN_HMAC_KEY=${{ secrets.ADYEN_HMAC_KEY }} --network host ghcr.io/adyen-examples/adyen-testing-suite:main - - - authorisation-adjustment: - runs-on: ubuntu-latest - steps: - - name: Authorisation Adjustment project - uses: actions/checkout@v3 - - name: Setup java - uses: actions/setup-java@v3 - with: - distribution: 'temurin' - java-version: 17 - - name: Grant execute permission for gradlew - run: chmod +x authorisation-adjustment-example/gradlew - - name: Build authorisation-adjustment-example with Gradle - run: cd authorisation-adjustment-example; ./gradlew build - - name: Build authorisation-adjustment-example image - run: docker build -t authorisation-adjustment-example:latest authorisation-adjustment-example - - name: Start authorisation-adjustment container - run: docker run --rm -d --name authorisation-adjustment-example -p 8080:8080 -e ADYEN_API_KEY="${{ secrets.ADYEN_API_KEY }}" -e ADYEN_MERCHANT_ACCOUNT=${{ secrets.ADYEN_MERCHANT_ACCOUNT }} -e ADYEN_CLIENT_KEY=${{ secrets.ADYEN_CLIENT_KEY }} -e ADYEN_HMAC_KEY=${{ secrets.ADYEN_HMAC_KEY }} authorisation-adjustment-example:latest - - name: Run testing suite - run: docker run --rm --name adyen-testing-suite -e PLAYWRIGHT_FOLDERNAME=authorisation-adjustment -e ADYEN_HMAC_KEY=${{ secrets.ADYEN_HMAC_KEY }} --network host ghcr.io/adyen-examples/adyen-testing-suite:main - - - in-person-payments: - runs-on: ubuntu-latest - steps: - - name: In-person Payments project - uses: actions/checkout@v3 - - name: Setup java - uses: actions/setup-java@v3 - with: - distribution: 'temurin' - java-version: 17 - - name: Grant execute permission for gradlew - run: chmod +x in-person-payments-example/gradlew - - name: Build in-person-payments-example with Gradle - run: cd in-person-payments-example; ./gradlew build - - name: Build in-person-payments-example image - run: docker build -t in-person-payments-example-image:latest in-person-payments-example - - name: Start in-person-payments-example container, set ADYEN_TERMINAL_API_CLOUD_ENDPOINT to default docker bridge and port 3000 - run: docker run --rm -d --name in-person-payments-example-image -p 8080:8080 -e ADYEN_API_KEY="${{ secrets.ADYEN_API_KEY }}" -e ADYEN_HMAC_KEY=${{ secrets.ADYEN_HMAC_KEY }} -e ADYEN_TERMINAL_API_CLOUD_ENDPOINT=http://172.17.0.1:3000 -e ADYEN_POS_POI_ID=V400m-123456789 in-person-payments-example-image:latest - - name: Start the Adyen Mock Terminal API Application on port 3000 - run: docker run --rm -d --name adyen-mock-terminal-api -p 3000:3000 -e PORT=3000 ghcr.io/adyen-examples/adyen-mock-terminal-api:main - - name: Run testing suite against in-person-payments-example-image - run: docker run --rm --name adyen-testing-suite -e ADYEN_HMAC_KEY=${{ secrets.ADYEN_HMAC_KEY }} -e PLAYWRIGHT_FOLDERNAME=in-person-payments --network host ghcr.io/adyen-examples/adyen-testing-suite:main