diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml new file mode 100644 index 0000000..5031800 --- /dev/null +++ b/.github/workflows/audit.yml @@ -0,0 +1,39 @@ +name: Audit + +on: + push: + branches: + - main + pull_request: + branches: + - '**' + +jobs: + audit: + runs-on: ubuntu-latest + + strategy: + matrix: + directory: [ + 'dhl-commercetools-events', + 'dhl-commercetools-custom-application' + ] + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: '20' + cache: 'yarn' + cache-dependency-path: ${{ matrix.directory }}/yarn.lock + + - name: Install dependencies + run: yarn + working-directory: ${{ matrix.directory }} + + - name: Run audit + run: yarn audit + working-directory: ${{ matrix.directory }} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..18ac14e --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,39 @@ +name: Build + +on: + push: + branches: + - main + pull_request: + branches: + - '**' + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + directory: [ + 'dhl-commercetools-events', + 'dhl-commercetools-custom-application' + ] + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: '20' + cache: 'yarn' + cache-dependency-path: ${{ matrix.directory }}/yarn.lock + + - name: Install dependencies + run: yarn + working-directory: ${{ matrix.directory }} + + - name: Build project + run: yarn build + working-directory: ${{ matrix.directory }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..6dc0bfa --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,39 @@ +name: Test + +on: + push: + branches: + - main + pull_request: + branches: + - '**' + +jobs: + test: + runs-on: ubuntu-latest + + strategy: + matrix: + directory: [ + 'dhl-commercetools-events', + 'dhl-commercetools-custom-application' + ] + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: '20' + cache: 'yarn' + cache-dependency-path: ${{ matrix.directory }}/yarn.lock + + - name: Install dependencies + run: yarn + working-directory: ${{ matrix.directory }} + + - name: Run tests + run: yarn test + working-directory: ${{ matrix.directory }} diff --git a/README.md b/README.md index d7ad5fe..95a7fbf 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ +![build](https://github.com/mediaopt/dhl-commercetools-connector/actions/workflows/build.yml/badge.svg) +![test](https://github.com/mediaopt/dhl-commercetools-connector/actions/workflows/test.yml/badge.svg) +![audit](https://github.com/mediaopt/dhl-commercetools-connector/actions/workflows/audit.yml/badge.svg) + # dhl-commercetools-custom-application ## Introduction