diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a48876e..6a5a7b4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 diff --git a/.github/workflows/template-sync.yml b/.github/workflows/template-sync.yml index 42685bb..f904f79 100644 --- a/.github/workflows/template-sync.yml +++ b/.github/workflows/template-sync.yml @@ -8,7 +8,8 @@ on: jobs: sync: name: Sync - runs-on: ubuntu-latest + runs-on: packages + container: node:22 steps: - name: Checkout @@ -16,7 +17,7 @@ jobs: - 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 }} @@ -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: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a11e096..01dd264 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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: | @@ -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 @@ -75,7 +53,8 @@ jobs: prettier: name: Prettier - runs-on: ubuntu-latest + runs-on: packages + container: node:22 steps: - name: Checkout code @@ -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: |