From 104fee61300353d87d7a24f97f661388b368a1f1 Mon Sep 17 00:00:00 2001 From: Peter Elmered Date: Thu, 26 Sep 2024 23:56:30 +0200 Subject: [PATCH] Merge workflows --- .github/workflows/report-metrics.yml | 31 ---------------------------- .github/workflows/run-tests.yml | 25 ++++++++++++++++++++++ 2 files changed, 25 insertions(+), 31 deletions(-) delete mode 100644 .github/workflows/report-metrics.yml diff --git a/.github/workflows/report-metrics.yml b/.github/workflows/report-metrics.yml deleted file mode 100644 index e6fdbf2..0000000 --- a/.github/workflows/report-metrics.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: report-metrics - -on: - workflow_dispatch: - push: - -jobs: - test: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: 8.3 - extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo - coverage: pcov - - name: Install dependencies - run: composer update --prefer-stable --prefer-dist --no-interaction - - name: Execute tests - run: vendor/bin/pest --coverage-clover=coverage.xml - - name: Execute type coverage tests - run: vendor/bin/pest --type-coverage --type-coverage-json=pest-coverage.json - - - name: Upload coverage results - run: | - bash <(curl -s https://raw.githubusercontent.com/getOtterWise/bash-uploader/main/uploader.sh) --repo-token ${{ secrets.OTTERWISE_TOKEN }} - bash <(curl -s https://raw.githubusercontent.com/getOtterWise/bash-uploader/main/uploader.sh) --type-coverage-file pest-coverage.json diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 44d7d64..25ad5dd 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -38,3 +38,28 @@ jobs: - name: Upload coverage results run: bash <(curl -s https://raw.githubusercontent.com/getOtterWise/bash-uploader/main/uploader.sh) --repo-token ${{ secrets.OTTERWISE_TOKEN }} bash <(curl -s https://raw.githubusercontent.com/getOtterWise/bash-uploader/main/uploader.sh) --type-coverage-file pest-coverage.json + + report-metrics: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: 8.3 + extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo + coverage: pcov + - name: Install dependencies + run: composer update --prefer-stable --prefer-dist --no-interaction + - name: Execute tests + run: vendor/bin/pest --coverage-clover=coverage.xml + - name: Execute type coverage tests + run: vendor/bin/pest --type-coverage --type-coverage-json=pest-coverage.json + + - name: Upload coverage results + run: | + bash <(curl -s https://raw.githubusercontent.com/getOtterWise/bash-uploader/main/uploader.sh) --repo-token ${{ secrets.OTTERWISE_TOKEN }} + bash <(curl -s https://raw.githubusercontent.com/getOtterWise/bash-uploader/main/uploader.sh) --type-coverage-file pest-coverage.json