Skip to content

Commit

Permalink
adds ci workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
zackAJ committed Feb 5, 2025
1 parent 15d21e9 commit 12397b1
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 3 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: PHP Composer

on:
push:
branches: [ 'dev' ]
pull_request:
branches: [ 'dev' ]

permissions:
contents: read

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Validate composer.json and composer.lock
run: composer validate --strict

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
run: composer install --prefer-dist --no-progress

- name: Run tests
run: composer test
5 changes: 2 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,8 @@
},
"scripts": {
"test": "vendor/bin/phpunit",
"test-features": "vendor/bin/phpunit tests/Feature",
"test-unit": "vendor/bin/phpunit tests/Unit",
"phpunit": "vendor/bin/phpunit"
"test:feature": "vendor/bin/phpunit tests/Feature",
"test:unit": "vendor/bin/phpunit tests/Unit"
},
"require-dev": {
"shipmonk/composer-dependency-analyser": "dev-master",
Expand Down

0 comments on commit 12397b1

Please sign in to comment.