-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from wmde/use-woodpecker-ci
Use Woodpecker CI
- Loading branch information
Showing
5 changed files
with
67 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
; <?php exit; ?> DO NOT REMOVE THIS LINE | ||
; file automatically generated or modified by Matomo; you can manually override the default values in global.ini.php by redefining them in this file. | ||
[database] | ||
host = "database" | ||
username = "root" | ||
password = "toor" | ||
dbname = "matomo" | ||
|
||
[database_tests] | ||
host = "database" | ||
username = "root" | ||
password = "toor" | ||
dbname = "matomo_t" | ||
|
||
[Development] | ||
enabled = 1 | ||
disable_merged_assets = 1 | ||
|
||
[tests] | ||
http_host = "localhost" | ||
port = 8080 | ||
request_uri="/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
clone: | ||
git: | ||
image: woodpeckerci/plugin-git | ||
settings: | ||
lfs: false | ||
|
||
steps: | ||
- name: build | ||
image: registry.gitlab.com/fun-tech/fundraising-frontend-docker:latest | ||
commands: | ||
- mkdir -p /woodpecker/src/github.com/matomo-org | ||
|
||
# Clone and configure Matomo with our plugin as a symlink | ||
- git clone --depth=1 -b 4.16.1 https://github.com/matomo-org/matomo /woodpecker/src/github.com/matomo-org/matomo | ||
- ln -s $CI_WORKSPACE /woodpecker/src/github.com/matomo-org/matomo/plugins/CampaignVisitorsByTime | ||
- cp $CI_WORKSPACE/.ci/config.ini.php /woodpecker/src/github.com/matomo-org/matomo/config/config.ini.php | ||
|
||
# Create database environment with fixtures | ||
- cd /woodpecker/src/github.com/matomo-org/matomo/ | ||
# The fixture script runs the `mysql` command, we need to install it | ||
- apt update | ||
- apt install -y mariadb-client | ||
- composer install --ignore-platform-req=ext-gd | ||
# the fixture setup needs a running web server, we'll start one in the background | ||
# and kill it when the fixture setup is done | ||
- php -S 0.0.0.0:8080 & | ||
- PHP_PID=$! | ||
- php -d memory_limit=8G console tests:setup-fixture UITestFixture | ||
- kill $PHP_PID | ||
|
||
# Finally run the unit test | ||
- ./console tests:run plugins/CampaignVisitorsByTime/tests/Unit/DataProcessorTest.php | ||
|
||
services: | ||
|
||
- name: database | ||
image: mariadb:10.4 | ||
environment: | ||
- MYSQL_ROOT_PASSWORD=toor | ||
- MYSQL_USER=matomo | ||
- MYSQL_PASSWORD=matomo | ||
- MYSQL_DATABASE=matomo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.