Skip to content

Commit

Permalink
Split Node build workflow (#591)
Browse files Browse the repository at this point in the history
* Create workflow per use case

* Remove workflow with all use cases
  • Loading branch information
gcatanese authored Sep 10, 2024
1 parent 5cc0c3a commit 5a3ce9c
Show file tree
Hide file tree
Showing 10 changed files with 304 additions and 185 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/build-3ds2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build 3DS2

on:
workflow_dispatch:
push:
branches: [ main ]
paths:
- '3ds2-example/**'
pull_request:
branches: [ main ]
paths:
- '3ds2-example/**'

jobs:
build-3ds2:

runs-on: ubuntu-latest
defaults:
run:
working-directory: '3ds2-example'
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: '3ds2-example'
- name: Build 3ds-example/frontend
run: npm install
working-directory: 3ds2-example/frontend
- name: Build 3ds2-example/backend
run: npm install
working-directory: 3ds2-example/backend
- name: Build 3ds2-example
run: npm install
working-directory: 3ds2-example
33 changes: 33 additions & 0 deletions .github/workflows/build-authorisation-adjustment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
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
defaults:
run:
working-directory: 'authorisation-adjustment-example'
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: 'authorisation-adjustment-example'
- name: Build authorisation-adjustment-example
run: npm install
33 changes: 33 additions & 0 deletions .github/workflows/build-checkout-advanced.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
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
defaults:
run:
working-directory: 'checkout-example-advanced'
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: 'checkout-example-advanced'
- name: Build checkout-example-advanced
run: npm install
33 changes: 33 additions & 0 deletions .github/workflows/build-checkout.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
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
defaults:
run:
working-directory: 'checkout-example'
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: 'checkout-example'
- name: Build checkout-example
run: npm install
33 changes: 33 additions & 0 deletions .github/workflows/build-giftcard.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
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
defaults:
run:
working-directory: 'giftcard-example'
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: 'giftcard-example'
- name: Build giftcard-example
run: npm install
33 changes: 33 additions & 0 deletions .github/workflows/build-giving.yml
Original file line number Diff line number Diff line change
@@ -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
defaults:
run:
working-directory: 'giving-example'
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: 'giving-example'
- name: Build giving-example
run: npm install
33 changes: 33 additions & 0 deletions .github/workflows/build-in-person-payments.yml
Original file line number Diff line number Diff line change
@@ -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
defaults:
run:
working-directory: 'in-person-payments-example'
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: 'in-person-payments-example'
- name: Build in-person-payments-example
run: npm install
33 changes: 33 additions & 0 deletions .github/workflows/build-paybylink.yml
Original file line number Diff line number Diff line change
@@ -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-paybylink:

runs-on: ubuntu-latest
defaults:
run:
working-directory: 'paybylink-example'
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: 'paybylink-example'
- name: Build paybylink-example
run: npm install
33 changes: 33 additions & 0 deletions .github/workflows/build-subscription.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build Subscription

on:
workflow_dispatch:
push:
branches: [ main ]
paths:
- 'subscription-example/**'
pull_request:
branches: [ main ]
paths:
- 'subscription-example/**'

jobs:
build-paybylink:

runs-on: ubuntu-latest
defaults:
run:
working-directory: 'subscription-example'
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: 'subscription-example'
- name: Build subscription-example
run: npm install
Loading

0 comments on commit 5a3ce9c

Please sign in to comment.