|
| 1 | +name: Plugin TreemapVisualization Tests |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + schedule: |
| 6 | + - cron: '0 0 * * *' |
| 7 | + |
| 8 | +permissions: |
| 9 | + actions: read |
| 10 | + checks: none |
| 11 | + contents: read |
| 12 | + deployments: none |
| 13 | + issues: write |
| 14 | + packages: none |
| 15 | + pull-requests: write |
| 16 | + repository-projects: none |
| 17 | + security-events: none |
| 18 | + statuses: none |
| 19 | +concurrency: |
| 20 | + group: ${{ github.head_ref }} |
| 21 | + cancel-in-progress: true |
| 22 | + |
| 23 | +jobs: |
| 24 | + |
| 25 | + PluginTests: |
| 26 | + runs-on: ubuntu-20.04 |
| 27 | + env: |
| 28 | + TARGET_BRANCH: github-aciton |
| 29 | + PLUGIN: TreemapVisualization |
| 30 | + services: |
| 31 | + redis: |
| 32 | + image: redis:5.0 |
| 33 | + ports: |
| 34 | + - 6379:6379 |
| 35 | + options: >- |
| 36 | + --health-cmd "redis-cli ping" |
| 37 | + --health-interval 10s |
| 38 | + --health-timeout 5s |
| 39 | + --health-retries 5 |
| 40 | + mariadb: |
| 41 | + image: mariadb:latest |
| 42 | + ports: |
| 43 | + - 3306:3306 |
| 44 | + env: |
| 45 | + MYSQL_DATABASE: piwik_tests |
| 46 | + MYSQL_ALLOW_EMPTY_PASSWORD: yes |
| 47 | + options: --tmpfs /var/lib/mysql:rw |
| 48 | + strategy: |
| 49 | + fail-fast: false |
| 50 | + matrix: |
| 51 | + include: |
| 52 | + - type: UI |
| 53 | + php-versions: '7.4' |
| 54 | + |
| 55 | + steps: |
| 56 | + - name: Setup PHP |
| 57 | + uses: shivammathur/setup-php@v2 |
| 58 | + with: |
| 59 | + php-version: ${{ matrix.php-versions }} |
| 60 | + extensions: bcmath, ldap, curl, zip, pdo_mysql, mysqli, gd, redis |
| 61 | + ini-values: | |
| 62 | + memory_limit = 4024M, |
| 63 | + max_execution_time=10000, |
| 64 | + always_populate_raw_post_data=-1, |
| 65 | + error_reporting=E_ALL, |
| 66 | + log_errors=on, display_errors=on, |
| 67 | + allow_url_fopen = on, |
| 68 | + zend.exception_ignore_args = Off |
| 69 | + tools: composer:v2 |
| 70 | + coverage: none |
| 71 | + |
| 72 | + - name: Checkout code |
| 73 | + uses: actions/checkout@v2 |
| 74 | + with: |
| 75 | + repository: matomo-org/matomo |
| 76 | + ref: ${{ env.TARGET_BRANCH }} |
| 77 | + lfs: false |
| 78 | + submodules: recursive |
| 79 | + path: ./matomo |
| 80 | + |
| 81 | + - name: Move File to right place |
| 82 | + run: | |
| 83 | + mkdir /home/runner/work/matomo |
| 84 | + mv ./matomo /home/runner/work/matomo/ |
| 85 | +
|
| 86 | + - name: Checkout Submodule to current Pull request |
| 87 | + working-directory: /home/runner/work/matomo/matomo |
| 88 | + run: | |
| 89 | + cd plugins/${{ env.PLUGIN }} |
| 90 | + git pull origin ${{ github.head_ref }} |
| 91 | + git checkout ${{ github.event.pull_request.head.sha }} |
| 92 | +
|
| 93 | + - name: Setup Node |
| 94 | + if: matrix.type == 'UI' |
| 95 | + uses: actions/setup-node@v2 |
| 96 | + with: |
| 97 | + node-version: '12' |
| 98 | + |
| 99 | + - name: prepare setup |
| 100 | + shell: bash |
| 101 | + working-directory: /home/runner/work/matomo/matomo |
| 102 | + run: ./.github/scripts/bash/prepare.sh |
| 103 | + env: |
| 104 | + PHP_VERSION: ${{ matrix.php-versions }} |
| 105 | + PIWIK_TEST_TARGET: ${{ matrix.type }} |
| 106 | + |
| 107 | + - name: PluginTests Test runing |
| 108 | + working-directory: /home/runner/work/matomo/matomo |
| 109 | + shell: bash |
| 110 | + run: ./.github/scripts/bash/plugins/pluginTests.sh |
| 111 | + env: |
| 112 | + TEST_SUITE: ${{ matrix.type }} |
| 113 | + PLUGIN_NAME: ${{ env.PLUGIN }} |
0 commit comments