Skip to content

Commit

Permalink
added more actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ogmueller committed Mar 19, 2024
1 parent 4391ebb commit 7bd45e0
Showing 1 changed file with 80 additions and 0 deletions.
80 changes: 80 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,86 @@ jobs:
- name: "Run friendsofphp/php-cs-fixer"
run: "vendor/bin/php-cs-fixer fix --ansi --config=.php-cs-fixer.php --diff --dry-run --show-progress=dots --verbose"

dependency-analysis:
name: "Dependency Analysis"
runs-on: "ubuntu-latest"
timeout-minutes: 5

strategy:
matrix:
php-version: ["8.3"]
composer-param: ["update --no-progress --prefer-dist"]
experimental: [false]

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

- name: "Lint YAML files"
uses: "ibiqlik/action-yamllint@v3"
with:
config_file: ".yamllint.yaml"
file_or_dir: "."
strict: true

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

- name: "Set up problem matchers for PHP"
run: "echo \"::add-matcher::${{ runner.tool_cache }}/php.json\""

- name: "Get composer cache directory"
id: "composer-cache"
run: "echo \"dir=$(composer config cache-dir)\" >> $GITHUB_OUTPUT"
continue-on-error: "${{ matrix.experimental }}"

- name: "Cache composer dependencies"
uses: "actions/cache@v4"
with:
path: "${{ steps.composer-cache.outputs.dir }}"
key: "${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}"
restore-keys: "${{ runner.os }}-composer-"
continue-on-error: "${{ matrix.experimental }}"

- name: "Install dependencies"
run: "composer ${{ matrix.composer-param }}"
continue-on-error: "${{ matrix.experimental }}"

- name: "Cache directory for rector/rector"
uses: "actions/cache@v4"
with:
path: ".build/rector"
key: "php-${{ matrix.php-version }}-rector-${{ github.ref_name }}"
restore-keys: |
php-${{ matrix.php-version }}-rector-main
php-${{ matrix.php-version }}-rector-
- name: "Create phive home directory"
run: "mkdir -p .build/phive"
shell: "bash"

- name: "Cache dependencies installed with phive"
uses: "actions/[email protected]"
with:
path: ".build/phive"
key: "phive-hashFiles('**/phars.xml')"
restore-keys: "phive-"

- name: "Install dependencies with phive"
env:
PHIVE_HOME: ".build/phive"
run: "phive install --trust-gpg-keys 0x2DF45277AEF09A2F,0x033E5F8D801A2F8D,0x033E5F8D801A2F8D"
shell: "bash"


- name: "Run maglnet/composer-require-checker"
run: ".phive/composer-require-checker check --ansi --config-file=$(pwd)/composer-require-checker.json --verbose"

refactoring:
name: "Refactoring"
runs-on: "ubuntu-latest"
Expand Down

0 comments on commit 7bd45e0

Please sign in to comment.