Skip to content

Commit

Permalink
Merge pull request #8 from spiral/update-github-actions
Browse files Browse the repository at this point in the history
Update github actions
  • Loading branch information
butschster committed Sep 13, 2022
2 parents 3ee76eb + f5dc279 commit faaea30
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 99 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
on:
pull_request:
push:
branches:
- master

name: phpunit

jobs:
phpunit:
uses: spiral/gh-actions/.github/workflows/phpunit.yml@master
with:
os: >-
['ubuntu-latest']
php: >-
['8.1', '8.2']
stability: >-
['prefer-lowest', 'prefer-stable']
51 changes: 0 additions & 51 deletions .github/workflows/run-tests.yml

This file was deleted.

61 changes: 13 additions & 48 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,16 @@
name: run-tests

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
static-analysis:
name: Psalm
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
php: [ 8.1 ]
os: [ ubuntu-latest ]

steps:
- name: Checkout
uses: actions/checkout@v3
pull_request:
push:
branches:
- master

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

- name: Validate Composer
run: composer validate

- name: Get Composer Cache Directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Restore Composer Cache
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-${{ matrix.php }}-composer

- name: Install Dependencies
uses: nick-invision/retry@v2
with:
timeout_minutes: 5
max_attempts: 5
command: composer update --prefer-dist --no-interaction --no-progress

- name: Static Analysis
run: vendor/bin/psalm --no-cache
jobs:
psalm:
uses: spiral/gh-actions/.github/workflows/psalm.yml@master
with:
os: >-
['ubuntu-latest']
php: >-
['8.1']

0 comments on commit faaea30

Please sign in to comment.