From a76e959920d05da8d3367385e47e9a685c49945c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Helfensd=C3=B6rfer?= Date: Sat, 11 Mar 2023 12:10:38 +0100 Subject: [PATCH] fix: tests --- .github/workflows/tests.yml | 38 +++++++++++++++++++++++++++++++++++++ tests/MatomoTest.php | 4 ++-- 2 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..66ae07d --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,38 @@ +name: PHPUnit + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-20.04 + strategy: + matrix: + php-versions: ['8.0', '8.1'] + + name: PHPUnit ${{ matrix.php-versions }} + + steps: + - uses: actions/checkout@v2 + + - name: Validate composer.json and composer.lock + run: composer validate + + - name: Cache Composer packages + id: composer-cache + uses: actions/cache@v2 + with: + path: vendor + key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} + restore-keys: | + ${{ runner.os }}-php- + - name: Install dependencies + if: steps.composer-cache.outputs.cache-hit != 'true' + run: composer install --prefer-dist --no-progress --no-suggest + + - name: Run test suite + run: composer run-script test diff --git a/tests/MatomoTest.php b/tests/MatomoTest.php index 8077161..3554b1a 100644 --- a/tests/MatomoTest.php +++ b/tests/MatomoTest.php @@ -7,9 +7,9 @@ class MatomoTest extends TestCase { - const TEST_SITE_URL = 'https://demo.matomo.org/'; + const TEST_SITE_URL = 'https://demo.matomo.cloud/'; - const TEST_SITE_ID = 62; + const TEST_SITE_ID = 1; const TEST_TOKEN = 'anonymous';