Skip to content

Commit

Permalink
ci: actions and container
Browse files Browse the repository at this point in the history
  • Loading branch information
brokeyourbike committed Feb 22, 2024
1 parent dcf794c commit e13ab45
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 7 deletions.
20 changes: 20 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM mcr.microsoft.com/devcontainers/php:0-8.1

RUN apt-get update && apt-get install -y \
libzip-dev \
libxml2-dev

# install php extensions
RUN docker-php-ext-install \
pdo \
pdo_mysql \
xml \
zip \
bcmath \
pcntl

# disable xdebug
RUN rm -f /usr/local/etc/php/conf.d/xdebug.ini

# set memory limit
RUN echo 'memory_limit = 512M' >> /usr/local/etc/php/conf.d/docker-php-memlimit.ini;
22 changes: 22 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/php
{
"name": "zenith-bank-api-client-php",

// More info: https://containers.dev/guide/dockerfile
"build": {
"dockerfile": "Dockerfile"
},

// Configure tool-specific properties.
"customizations": {
"vscode": {
"extensions": [
"bmewburn.vscode-intelephense-client",
"calebporzio.better-phpunit",
"neilbrayfield.php-docblocker",
"MehediDracula.php-namespace-resolver"
]
}
}
}
2 changes: 1 addition & 1 deletion .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ jobs:
release-type: php
bump-minor-pre-major: true

- uses: actions/checkout@v2
- uses: actions/checkout@v3
if: ${{ steps.release.outputs.release_created }}
2 changes: 1 addition & 1 deletion .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

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

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

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

- name: Install PHP
uses: shivammathur/setup-php@v2
Expand All @@ -31,14 +31,15 @@ jobs:
run: vendor/bin/phpunit --coverage-clover=coverage.xml

- name: Upload coverage to codecov
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v4
continue-on-error: true
with:
files: ./coverage.xml

- name: Upload coverage to codeclimate
uses: paambaati/codeclimate-action@v3.0.0
uses: paambaati/codeclimate-action@v5
continue-on-error: true
env:
CC_TEST_REPORTER_ID: ${{ secrets.CODECLIMATE_TOKEN }}
with:
coverageCommand: ''
coverageLocations: ./coverage.xml:clover
7 changes: 6 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,10 @@
"phpunit/phpunit": "^9",
"mockery/mockery": "^1.4"
},
"version": "0.3.2"
"version": "0.3.2",
"config": {
"allow-plugins": {
"bamarni/composer-bin-plugin": true
}
}
}

0 comments on commit e13ab45

Please sign in to comment.