Skip to content
This repository was archived by the owner on May 31, 2022. It is now read-only.

Commit 1ba73c8

Browse files
author
Matthias Leutenegger
committed
change: switch to github workflow for tests
1 parent 7b83a24 commit 1ba73c8

File tree

4 files changed

+106
-45
lines changed

4 files changed

+106
-45
lines changed

.github/dependabot.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: "/"
5+
schedule:
6+
interval: "daily"
7+
assignees:
8+
- 'mleutenegger'

.github/workflows/tests.yml

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
name: 🎭 Tests
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
branches:
8+
- master
9+
env:
10+
DB: MYSQL
11+
PDO: 1
12+
SS_ENVIRONMENT_TYPE: "dev"
13+
RECIPE_CMS_VERSION: 4.x-dev
14+
GRAPHQL_VERSION: '^3'
15+
jobs:
16+
# phpunit:
17+
# name: 🧩 PHPUnit
18+
# runs-on: ubuntu-latest
19+
# strategy:
20+
# fail-fast: false
21+
# matrix:
22+
# php:
23+
# - 7.1
24+
# - 7.2
25+
# - 7.3
26+
# - 7.4
27+
# container: brettt89/silverstripe-web:${{ matrix.php }}-apache
28+
# services:
29+
# database:
30+
# image: mysql:5.7
31+
# ports:
32+
# - 3306:3306
33+
# env:
34+
# MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
35+
# env:
36+
# SS_DEFAULT_ADMIN_USERNAME: admin
37+
# SS_DEFAULT_ADMIN_PASSWORD: admin
38+
# SS_DATABASE_SERVER: database
39+
# SS_DATABASE_NAME: ss_default_${{ matrix.php }}
40+
# SS_DATABASE_USERNAME: root
41+
# SS_DATABASE_PASSWORD: ''
42+
# SS_ENVIRONMENT_TYPE: dev
43+
# steps:
44+
# - name: Install Composer
45+
# run: |
46+
# curl \
47+
# -sS https://getcomposer.org/installer \
48+
# | php && \
49+
# mv -f composer.phar /usr/local/bin/composer
50+
# - name: Checkout code
51+
# uses: actions/checkout@v2
52+
# - name: install dependencies
53+
# run: |
54+
# composer require --no-update silverstripe/recipe-cms:$RECIPE_CMS_VERSION &&\
55+
# composer install --prefer-dist --no-interaction --no-progress --no-suggest --optimize-autoloader --verbose --profile
56+
# - name: run phpunit
57+
# run: vendor/bin/phpunit -c "phpunit.xml" tests/
58+
# - name: generate coverage
59+
# run: phpdbg -qrr vendor/bin/phpunit -dmemory_limit=512M --coverage-clover=coverage.xml tests/
60+
# if: ${{ matrix.php == '7.4' }}
61+
# - name: submit coverage
62+
# uses: codecov/codecov-action@v1
63+
# with:
64+
# file: ./coverage.xml
65+
# if: ${{ matrix.php == '7.4' }}
66+
phpstan:
67+
name: 🔺 PHPStan
68+
runs-on: ubuntu-latest
69+
container: brettt89/silverstripe-web:7.4-apache
70+
steps:
71+
- name: Install Composer
72+
run: |
73+
curl \
74+
-sS https://getcomposer.org/installer \
75+
| php && \
76+
mv -f composer.phar /usr/local/bin/composer
77+
- name: Checkout code
78+
uses: actions/checkout@v2
79+
- name: install dependencies
80+
run: |
81+
composer require --no-update silverstripe/graphql:$GRAPHQL_VERSION silverstripe/recipe-cms:$RECIPE_CMS_VERSION &&\
82+
composer install --prefer-dist --no-interaction --no-progress --no-suggest --optimize-autoloader --verbose --profile
83+
- name: run phpstan
84+
run: vendor/bin/phpstan analyse src/ -c "phpstan.neon" -a vendor/symbiote/silverstripe-phpstan/bootstrap.php --level 4
85+
phpcs:
86+
name: 🔮 PHPcs
87+
runs-on: ubuntu-latest
88+
steps:
89+
- name: Checkout code
90+
uses: actions/checkout@v2
91+
- name: lint source
92+
uses: chindit/actions-phpcs@master
93+
with:
94+
dir: src/
95+
- name: lint tests
96+
uses: chindit/actions-phpcs@master
97+
with:
98+
dir: tests/

.travis.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.

phpstan.neon

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
parameters:
22
autoload_directories:
33
- src
4-
- tests
54
ignoreErrors:
65
- '#Call to an undefined method [a-zA-Z0-9\\_]*UncleCheese\\DisplayLogic\\Criteria::isChecked\(\)#'
76
includes:

0 commit comments

Comments
 (0)