Skip to content

Commit

Permalink
chore: Sync changes from the template (#32)
Browse files Browse the repository at this point in the history
Co-authored-by: oprypkhantc <[email protected]>
  • Loading branch information
package-sync[bot] and oprypkhantc authored Apr 29, 2024
1 parent 88d63ce commit 5a66e59
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 52 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ on:
jobs:
release:
name: Release
runs-on: ubuntu-latest
runs-on: packages
container: node:22
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/template-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,16 @@ on:
jobs:
sync:
name: Sync
runs-on: ubuntu-latest
runs-on: packages
container: node:22

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

- name: Sync from template
id: sync_from_template
uses: tenantcloud/[email protected].11
uses: tenantcloud/[email protected].12
with:
token: ${{ secrets.GITHUB_TOKEN }}

Expand Down Expand Up @@ -50,7 +51,8 @@ jobs:
# after 60 days without commits, so this job is there to prevent it.
workflow-keepalive:
name: Workflow keepalive
runs-on: ubuntu-latest
runs-on: packages
container: node:22
if: github.event_name == 'schedule'

permissions:
Expand Down
64 changes: 16 additions & 48 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,27 @@
name: Tests

on: [push, pull_request]
on: [pull_request]

jobs:
phpunit:
name: PHPUnit on PHP v${{ matrix.php }} & TestBench ${{ matrix.test-bench }}
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
php: [8.2]
test-bench: [^8.0]

runs-on: packages
container: chialab/php:${{ matrix.php }}
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:v2
coverage: none

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

- name: Cache Composer packages
id: composer-cache
- name: Composer cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
key: composer-${{ runner.os }}-${{ hashFiles('composer.json') }}

- name: Install dependencies
run: |
Expand All @@ -45,27 +33,17 @@ jobs:

php-cs-fixer:
name: php-cs-fixer
runs-on: ubuntu-latest
runs-on: packages
container: chialab/php:8.2
steps:
- name: Checkout code
uses: actions/checkout@v3

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

- name: Cache Composer packages
id: composer-cache
- name: Composer cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
key: composer-${{ runner.os }}-${{ hashFiles('composer.json') }}

- name: Install dependencies
run: composer install --prefer-dist --no-progress
Expand All @@ -75,7 +53,8 @@ jobs:

prettier:
name: Prettier
runs-on: ubuntu-latest
runs-on: packages
container: node:22

steps:
- name: Checkout code
Expand All @@ -88,34 +67,23 @@ jobs:

phpstan:
name: PHPStan on PHP v${{ matrix.php }} & TestBench ${{ matrix.test-bench }}
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
php: [8.2]
test-bench: [^8.0]

runs-on: packages
container: chialab/php:${{ matrix.php }}
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:v2
coverage: none

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

- name: Cache Composer packages
id: composer-cache
- name: Composer cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
key: composer-${{ runner.os }}-${{ hashFiles('composer.json') }}

- name: Install dependencies
run: |
Expand Down

0 comments on commit 5a66e59

Please sign in to comment.