This repository has been archived by the owner on Dec 9, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TASK] Switch the CI from Travis CI to GitHub actions (#199)
- Loading branch information
1 parent
03c90ba
commit 5c91c84
Showing
5 changed files
with
103 additions
and
105 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,93 @@ | ||
--- | ||
name: CI | ||
on: | ||
push: | ||
pull_request: | ||
jobs: | ||
php-lint: | ||
name: "PHP linter" | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: "Checkout" | ||
uses: actions/checkout@v2 | ||
- name: "Install PHP" | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: "${{ matrix.php-version }}" | ||
tools: composer:v2 | ||
- name: "Run PHP lint" | ||
run: "composer ci:php:lint" | ||
strategy: | ||
matrix: | ||
php-version: | ||
- 7.0 | ||
- 7.1 | ||
- 7.2 | ||
- 7.3 | ||
unit-tests: | ||
name: "Unit tests" | ||
runs-on: ubuntu-20.04 | ||
needs: php-lint | ||
services: | ||
mysql: | ||
image: mysql:5.7 | ||
env: | ||
MYSQL_ALLOW_EMPTY_PASSWORD: yes | ||
MYSQL_DATABASE: laravel_tags | ||
ports: | ||
- 3306 | ||
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | ||
env: | ||
DATABASE_HOST: 127.0.0.1 | ||
DATABASE_USER: root | ||
DATABASE_PASSWORD: root | ||
DATABASE_NAME: typo3 | ||
steps: | ||
- | ||
name: "Checkout" | ||
uses: actions/checkout@v2 | ||
- | ||
name: "Install PHP" | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: "${{ matrix.php-version }}" | ||
tools: composer:v2 | ||
extensions: mysqli | ||
- name: "Show Composer version" | ||
run: composer --version | ||
- | ||
name: "Cache dependencies installed with composer" | ||
uses: actions/cache@v1 | ||
with: | ||
key: "php${{ matrix.php-version }} | ||
-composer-${{ hashFiles('**/composer.json') }}" | ||
path: ~/.composer/cache | ||
restore-keys: "php${{ matrix.php-version }}-composer-\n" | ||
- | ||
env: | ||
TYPO3: "${{ matrix.typo3-version }}" | ||
name: "Install TYPO3 Core" | ||
run: | | ||
composer require --no-progress typo3/minimal:"$TYPO3" | ||
composer show | ||
- | ||
name: "Start MySQL" | ||
run: "sudo /etc/init.d/mysql start" | ||
- | ||
name: "Set up TYPO3" | ||
run: > | ||
.Build/vendor/bin/typo3cms install:setup --no-interaction --site-setup-type="site" | ||
--database-user-name="${DATABASE_USER}" --database-host-name="${DATABASE_HOST}" | ||
--database-port="${{ job.services.mysql.ports[3306] }}" --database-name="${DATABASE_NAME}" | ||
--admin-user-name="admin" --admin-password="password" --site-name="Test installation"; | ||
- | ||
name: "Run unit tests" | ||
run: "composer ci:tests:unit" | ||
strategy: | ||
matrix: | ||
php-version: | ||
- 7.2 | ||
- 7.3 | ||
typo3-version: | ||
- ^8.7 | ||
- ^9.5 |
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 |
---|---|---|
@@ -1,6 +1,8 @@ | ||
/.Build/* | ||
# Please keep the lines in this file sorted. | ||
*.idea | ||
/.Build/* | ||
/.php_cs.cache | ||
/Resources/Private/Build/vendor | ||
/composer.lock | ||
/nbproject | ||
/Resources/Private/Build/vendor | ||
/var |
This file was deleted.
Oops, something went wrong.
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