From 6de8dfbbb44f3d74d60fe7380c6a22d5926148b3 Mon Sep 17 00:00:00 2001 From: mbe Date: Tue, 9 Jul 2024 10:18:47 +0200 Subject: [PATCH] #36574 add badges to README.md --- .github/workflows/audit.yml | 40 +++++++++++++++++++++++++ .github/workflows/{ci.yml => build.yml} | 12 ++------ .github/workflows/test.yml | 40 +++++++++++++++++++++++++ README.md | 4 +++ 4 files changed, 86 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/audit.yml rename .github/workflows/{ci.yml => build.yml} (78%) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml new file mode 100644 index 0000000..7c8b002 --- /dev/null +++ b/.github/workflows/audit.yml @@ -0,0 +1,40 @@ +name: Audit + +on: + push: + branches: + - main + pull_request: + branches: + - '**' + +jobs: + audit: + runs-on: ubuntu-latest + + strategy: + matrix: + directory: [ + 'paypal-commercetools-events', + 'paypal-commercetools-extension', + 'paypal-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/ci.yml b/.github/workflows/build.yml similarity index 78% rename from .github/workflows/ci.yml rename to .github/workflows/build.yml index 37ceb42..93d0f7d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: CI +name: Build on: push: @@ -9,7 +9,7 @@ on: - '**' jobs: - yarn-check: + build: runs-on: ubuntu-latest strategy: @@ -38,11 +38,3 @@ jobs: - name: Build project run: yarn build working-directory: ${{ matrix.directory }} - - - name: Run tests - run: yarn test - working-directory: ${{ matrix.directory }} - - - name: Run audit - run: yarn audit - working-directory: ${{ matrix.directory }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..e452562 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,40 @@ +name: Test + +on: + push: + branches: + - main + pull_request: + branches: + - '**' + +jobs: + test: + runs-on: ubuntu-latest + + strategy: + matrix: + directory: [ + 'paypal-commercetools-events', + 'paypal-commercetools-extension', + 'paypal-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 b14e043..d18772e 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ +![build](https://github.com/mediaopt/paypal-commercetools-connector/actions/workflows/build.yml/badge.svg) +![test](https://github.com/mediaopt/paypal-commercetools-connector/actions/workflows/test.yml/badge.svg) +![audit](https://github.com/mediaopt/paypal-commercetools-connector/actions/workflows/audit.yml/badge.svg) +

commercetools logo