Setup GitHub Actions
This commit is contained in:
parent
15792da159
commit
1ee17e995a
|
|
@ -4,7 +4,6 @@ app/constants.php export-subst
|
||||||
.gitattributes export-ignore
|
.gitattributes export-ignore
|
||||||
.gitignore export-ignore
|
.gitignore export-ignore
|
||||||
.dockerignore export-ignore
|
.dockerignore export-ignore
|
||||||
.travis.yml export-ignore
|
|
||||||
|
|
||||||
docker export-ignore
|
docker export-ignore
|
||||||
Dockerfile export-ignore
|
Dockerfile export-ignore
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
name: Linters
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches: [ master ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
jshint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container: kanboard/tests:latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Install jshint
|
||||||
|
run: npm install -g jshint
|
||||||
|
- name: Run jshint
|
||||||
|
run: jshint ./assets/js/core ./assets/js/components
|
||||||
|
|
@ -0,0 +1,47 @@
|
||||||
|
name: Unit Tests
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches: [ master ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
Sqlite:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container: kanboard/tests:latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Validate composer.json and composer.lock
|
||||||
|
run: composer validate
|
||||||
|
- name: Install dependencies
|
||||||
|
run: composer install --prefer-dist --no-progress --no-suggest
|
||||||
|
- name: Unit tests with Sqlite
|
||||||
|
run: ./vendor/bin/phpunit -c tests/units.sqlite.xml
|
||||||
|
|
||||||
|
Postgres:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container: kanboard/tests:latest
|
||||||
|
services:
|
||||||
|
postgres:
|
||||||
|
image: postgres:9.4
|
||||||
|
env:
|
||||||
|
POSTGRES_USER: postgres
|
||||||
|
POSTGRES_PASSWORD: postgres
|
||||||
|
POSTGRES_DB: postgres
|
||||||
|
ports:
|
||||||
|
- 5432:5432
|
||||||
|
options: >-
|
||||||
|
--health-cmd pg_isready
|
||||||
|
--health-interval 10s
|
||||||
|
--health-timeout 5s
|
||||||
|
--health-retries 5
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Validate composer.json and composer.lock
|
||||||
|
run: composer validate
|
||||||
|
- name: Install dependencies
|
||||||
|
run: composer install --prefer-dist --no-progress --no-suggest
|
||||||
|
- name: Unit tests with Postgres
|
||||||
|
run: ./vendor/bin/phpunit -c tests/units.postgres.xml
|
||||||
|
env:
|
||||||
|
DB_HOSTNAME: postgres
|
||||||
|
DB_PORT: ${{ job.services.postgres.ports[5432] }}
|
||||||
32
.travis.yml
32
.travis.yml
|
|
@ -1,32 +0,0 @@
|
||||||
notifications:
|
|
||||||
email: false
|
|
||||||
|
|
||||||
git:
|
|
||||||
depth: 3
|
|
||||||
|
|
||||||
services:
|
|
||||||
- postgresql
|
|
||||||
|
|
||||||
language: php
|
|
||||||
sudo: false
|
|
||||||
|
|
||||||
php:
|
|
||||||
- 7.4
|
|
||||||
- 7.3
|
|
||||||
- 7.2
|
|
||||||
|
|
||||||
env:
|
|
||||||
- DB=sqlite
|
|
||||||
- DB=postgres
|
|
||||||
|
|
||||||
matrix:
|
|
||||||
fast_finish: true
|
|
||||||
|
|
||||||
before_script:
|
|
||||||
- composer install --no-interaction
|
|
||||||
- npm install -g jshint
|
|
||||||
|
|
||||||
script:
|
|
||||||
- jshint assets/js/{core,components}
|
|
||||||
- ./vendor/bin/phpunit -c tests/units.$DB.xml
|
|
||||||
- ./vendor/bin/phpunit tests/configtest
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
Kanboard
|
Kanboard
|
||||||
========
|
========
|
||||||
|
|
||||||
[](https://travis-ci.org/kanboard/kanboard)
|
|
||||||
|
|
||||||
Kanboard is project management software that focuses on the Kanban methodology.
|
Kanboard is project management software that focuses on the Kanban methodology.
|
||||||
|
|
||||||
- Official website: <https://kanboard.org/>
|
- Official website: <https://kanboard.org/>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
# This Dockerfile can be used to run unit tests.
|
||||||
|
# This image is published on the Docker Hub: kanboard/tests:latest
|
||||||
|
FROM debian:10-slim
|
||||||
|
|
||||||
|
RUN apt-get update -y -q && \
|
||||||
|
apt-get install -y \
|
||||||
|
php-cli \
|
||||||
|
php-mbstring \
|
||||||
|
php-sqlite3 \
|
||||||
|
php-opcache \
|
||||||
|
php-json \
|
||||||
|
php-ldap \
|
||||||
|
php-gd \
|
||||||
|
php-zip \
|
||||||
|
php-curl \
|
||||||
|
php-xml \
|
||||||
|
php-mysql \
|
||||||
|
php-pgsql \
|
||||||
|
composer \
|
||||||
|
npm \
|
||||||
|
git \
|
||||||
|
make \
|
||||||
|
mariadb-client \
|
||||||
|
postgresql-client
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
<php>
|
<php>
|
||||||
<const name="DB_DRIVER" value="postgres" />
|
<const name="DB_DRIVER" value="postgres" />
|
||||||
<const name="DB_USERNAME" value="postgres" />
|
<const name="DB_USERNAME" value="postgres" />
|
||||||
<const name="DB_PASSWORD" value="" />
|
<const name="DB_PASSWORD" value="postgres" />
|
||||||
<const name="DB_NAME" value="kanboard_unit_test" />
|
<const name="DB_NAME" value="kanboard_unit_test" />
|
||||||
</php>
|
</php>
|
||||||
</phpunit>
|
</phpunit>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue