Skip to content

Commit

Permalink
Set up CI for repo
Browse files Browse the repository at this point in the history
  • Loading branch information
AdmTal committed Aug 7, 2023
1 parent 0280a7a commit d189b77
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 68 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/pr-checks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: PR Checks

on:
pull_request:
branches:
- master

jobs:
build:
name: Build
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Build Docker
run: docker build . --tag omnipay-vindicia

- name: Test
run: docker run --rm omnipay-vindicia make test
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,5 @@
*~
*#

composer.lock
composer-psalm.lock
composer.phar
/vendor
.idea
17 changes: 17 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM php:7.4-cli

RUN apt-get update && \
apt-get install -y \
libxml2-dev \
unzip \
git \
zlib1g-dev \
libzip-dev && \
docker-php-ext-install soap zip

COPY . /omnipay-vindicia
WORKDIR /omnipay-vindicia

COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer

RUN composer install
28 changes: 0 additions & 28 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
# Test

all: with_psalm

no_psalm: style test

with_psalm: style psalm test

style:
vendor/bin/phpcs --standard=PSR2 src && vendor/bin/phpcs --standard=PSR2 --error-severity=1 --warning-severity=6 tests

Expand All @@ -14,23 +6,3 @@ test:

psalm:
vendor/bin/psalm

# Install

install: install_with_psalm

install_with_psalm:
COMPOSER=composer-psalm.json php composer.phar install

install_no_psalm:
php composer.phar install

# Update

update: update_with_psalm

update_with_psalm:
COMPOSER=composer-psalm.json php composer.phar update

update_no_psalm:
php composer.phar update
36 changes: 0 additions & 36 deletions composer-psalm.json

This file was deleted.

3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"ext-soap": "*"
},
"require-dev": {
"omnipay/tests": "~2.0"
"omnipay/tests": "~4.0",
"squizlabs/php_codesniffer": "~3.7.2"
}
}

0 comments on commit d189b77

Please sign in to comment.