Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,20 @@ on: [push]

jobs:
build:
strategy:
matrix:
version: ['7.4', '8.0', '8.1', '8.2']
env:
PHP_VERSION: ${{ matrix.version }}

runs-on: ubuntu-latest

steps:
- name: Set Swap Space
uses: pierotofy/set-swap-space@master
with:
swap-size-gb: 10

- uses: actions/checkout@v2

- name: Generate ssh keygen for the containers interaction
Expand All @@ -33,6 +43,7 @@ jobs:

- name: Check with php-cs-fixer
run: docker-compose run --rm --no-deps dplr vendor/bin/php-cs-fixer fix --dry-run --using-cache=no --show-progress=none -v
if: ${{ matrix.version == '7.4' }}

- name: Run tests
run: docker-compose run --rm --no-deps dplr vendor/bin/phpunit
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
}
],
"require": {
"php": ">=7.3",
"php": ">=7.4 || ^8",
"ext-json": "*"
},
"autoload": {
Expand Down
5 changes: 4 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
version: "3.1"
services:
dplr:
build: docker/images/dplr
build:
context: ./docker/images/dplr
args:
PHP_VERSION: ${PHP_VERSION:-7.4}
working_dir: /var/www/dplr
volumes:
- ./:/var/www/dplr
Expand Down
3 changes: 2 additions & 1 deletion docker/images/dplr/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
ARG PHP_VERSION=7.4
FROM golang:alpine AS gossha

RUN apk --update --no-cache add --virtual build-dependencies \
git make \
&& go install github.com/YuriyNasretdinov/GoSSHa@latest \
&& apk update && apk del build-dependencies

FROM php:7.3-alpine
FROM php:${PHP_VERSION}-alpine

COPY --from=gossha /go/bin/GoSSHa /usr/local/bin/GoSSHa

Expand Down