Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Sync changes from the template #19

Merged
merged 1 commit into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/template-sync@v1.0.0-alpha.11
uses: tenantcloud/template-sync@v1.0.0-alpha.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
Loading