Skip to content

Commit

Permalink
Standardize github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
cable8mm committed Mar 9, 2024
1 parent 22065e2 commit b154b46
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/lint.yml → .github/workflows/code-style.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,27 @@
name: PHP Linting (Pint)
name: code-style

on:
workflow_dispatch:
push:
branches-ignore:
- "dependabot/npm_and_yarn/*"
jobs:
phplint:
pint:
runs-on: ubuntu-latest
name: Pint
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 2

- name: "laravel-pint"
uses: aglipanci/laravel-pint-action@0.1.0
with:
preset: laravel

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Linting
skip_fetch: true
13 changes: 4 additions & 9 deletions .github/workflows/php.yml → .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
name: Tests
name: run-tests

on:
workflow_dispatch:
push:
branches-ignore:
- "dependabot/npm_and_yarn/*"

permissions:
contents: read

jobs:
build:
test:
runs-on: ubuntu-latest

strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
php: [8.0, 8.1, 8.2, 8.3]

name: PHP ${{ matrix.php }}
Expand All @@ -36,8 +34,5 @@ jobs:
- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest

# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
# Docs: https://getcomposer.org/doc/articles/scripts.md

- name: Run test suite
- name: Execute tests
run: composer test

0 comments on commit b154b46

Please sign in to comment.