Skip to content

Commit

Permalink
Add GitHub workflow and gitattribute file
Browse files Browse the repository at this point in the history
  • Loading branch information
ker0x committed Mar 7, 2023
1 parent 7bfe1c4 commit 44107c9
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 12 deletions.
9 changes: 9 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Path-based git attributes
# https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html

# Ignore all test and documentation with "export-ignore".
/.github export-ignore
/tests export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/phpunit.xml.dist export-ignore
43 changes: 43 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: ci

on:
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
php-version: [ '7.4', '8.0', '8.1', '8.2' ]

steps:
- name: checkout
uses: actions/checkout@v3

- name: php-setup
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}

- name: composer-validate
run: composer validate

- name: composer-cache
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.php-version }}-composer-
- name: composer-install
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install --prefer-dist --no-progress --no-suggest

- name: phpunit
run: vendor/bin/phpunit
18 changes: 6 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
/tests/cache
/.idea/
/tests/App/var
/tests/coverage/
/vendor/
phpunit.xml
.phpunit.result.cache
composer.lock
.idea/
cache/
var/
tests/coverage/
.DS_Store
.php_cs.cache
.php-cs-fixer.cache
*.sqlite
.preload.php
composer.lock
.phpunit.result.cache
phpunit.xml
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
],
"require": {
"php": ">=7.4",
"doctrine/annotations": "^2.0",
"doctrine/orm": "^2.7",
"paragonie/ciphersweet": "^3.0",
"symfony/config": "^4.4 || ^5.1 || ^6.0",
Expand Down

0 comments on commit 44107c9

Please sign in to comment.