Skip to content

Commit

Permalink
chore: generate actions
Browse files Browse the repository at this point in the history
  • Loading branch information
mychidarko committed Oct 21, 2024
1 parent 5de02ab commit e49670c
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Lint code

on: [push]

jobs:
lint:
runs-on: ubuntu-latest
strategy:
fail-fast: true

steps:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
extensions: json, zip, dom, curl, libxml, mbstring
tools: composer:v2
coverage: none

- name: Install PHP dependencies
run: composer update --no-interaction --no-progress

- name: Run Linter
run: composer run lint

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: 'chore: fix styling'
32 changes: 32 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Run Tests

on: ["push","pull_request"]

jobs:
tests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: ["ubuntu-latest"]
php: ["8.3"]

name: PHP ${{ matrix.php }} - ${{ matrix.os }}

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

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: json, zip, dom, curl, libxml, mbstring
tools: composer:v2
coverage: xdebug

- name: Install PHP dependencies
run: composer update --no-interaction --no-progress

- name: Run Tests
run: composer run test

0 comments on commit e49670c

Please sign in to comment.