Skip to content

Commit

Permalink
Move travis phpunit to github actions
Browse files Browse the repository at this point in the history
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
  • Loading branch information
skjnldsv committed Feb 3, 2020
1 parent 1fc41da commit 1d3d46e
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 65 deletions.
82 changes: 82 additions & 0 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: PHPUnit

on:
pull_request:
push:
branches:
- master
- stable*

jobs:
php:
runs-on: ubuntu-latest

strategy:
matrix:
php-versions: ['7.2', '7.3', '7.4']
databases: ['mysql']
server-versions: ['master']

name: php${{ matrix.php-versions }} with ${{ matrix.databases }} on ${{ matrix.server-versions }}

services:
mysql:
image: mariadb
env:
MYSQL_ROOT_PASSWORD: rootpassword
MYSQL_PASSWORD: password
MYSQL_DATABASE: nextcloud
MYSQL_USER: nextcloud
ports:
- 3307:3306 # ubuntu already uses this port
# postgres:
# image: postgres
# env:
# POSTGRES_USER: nextcloud
# POSTGRES_PASSWORD: password
# POSTGRES_DB: nextcloud
# ports:
# - 5432/tcp

steps:
- name: Verify MySQL connection from container
run: |
sudo apt-get update
sudo apt-get install -y mysql-client
mysql --host mysql --port 3307 -uroot -prootpassword -e "SHOW DATABASES"
# - name: Checkout server
# uses: actions/checkout@v2
# with:
# repository: nextcloud/server
# ref: ${{ matrix.server-versions }}
# - name: Checkout submodules
# shell: bash
# run: |
# auth_header="$(git config --local --get http.https://github.com/.extraheader)"
# git submodule sync --recursive
# git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
# - name: Checkout app
# uses: actions/checkout@v2
# with:
# path: apps/notestutorial
# - name: Set up php${{ matrix.php-versions }}
# uses: shivammathur/setup-php@v1
# with:
# php-version: ${{ matrix.php-versions }}
# tools: phpunit
# extensions: intl, pdo_mysql, pdo_pgsql
# coverage: none
# - name: Set up nextcloud
# run: |
# pwd
# ls -la
# mkdir data
# ./occ maintenance:install --database ${{ matrix.databases }} --database-name nextcloud --database-port=3307 --database-user nextcloud --database-pass password --admin-user admin --admin-pass password
# ./occ app:enable notestutorial
# php -S localhost:8080 &
# - name: PHPUnit
# working-directory: apps/notestutorial
# run: phpunit -c phpunit.xml
# - name: PHPUnit integration
# working-directory: apps/notestutorial
# run: phpunit -c phpunit.integration.xml
65 changes: 0 additions & 65 deletions .travis.yml

This file was deleted.

0 comments on commit 1d3d46e

Please sign in to comment.