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

Fixed code-style.yml and update README.md #225

Merged
merged 2 commits into from
Mar 27, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/code-style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,16 @@ jobs:
extensions: curl, mbstring, zip, pcntl, pdo, pdo_sqlite, iconv, json
coverage: none

- name: Setup Dependencies
run: |
composer global config --no-plugins allow-plugins.dragon-code/codestyler true
composer global config --no-plugins allow-plugins.ergebnis/composer-normalize true
composer global config --no-plugins allow-plugins.symfony/thanks true

composer config --no-plugins allow-plugins.dragon-code/codestyler true
composer config --no-plugins allow-plugins.ergebnis/composer-normalize true
composer config --no-plugins allow-plugins.symfony/thanks true

- name: Install dependency
run: |
composer global require dragon-code/codestyler
Expand Down
40 changes: 40 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,16 @@ jobs:
extensions: curl, mbstring, zip, pcntl, pdo, pdo_sqlite, iconv, json
coverage: none

- name: Setup Dependencies
run: |
composer global config --no-plugins allow-plugins.dragon-code/codestyler true
composer global config --no-plugins allow-plugins.ergebnis/composer-normalize true
composer global config --no-plugins allow-plugins.symfony/thanks true

composer config --no-plugins allow-plugins.dragon-code/codestyler true
composer config --no-plugins allow-plugins.ergebnis/composer-normalize true
composer config --no-plugins allow-plugins.symfony/thanks true

- name: Install dependency
run: |
composer global require dragon-code/codestyler
Expand Down Expand Up @@ -250,6 +260,36 @@ jobs:
labels: code-style
```

You can also use a simplified version of the configuration by linking to our settings.

In this case, the following settings will be applied:

- Always checks if the event is not equal to `push` or the branch is not equal to `main`
- Correcting the code style will take the following steps:
- Will add the following plugins to the list
of [allowed plugins](https://getcomposer.org/doc/06-config.md#allow-plugins)
in your `composer.json` file:
- `dragon-code/codestyler`
- `ergebnis/composer-normalize`
- `symfony/thanks`
- Updates the `.github/dependabot.yml` file
- Updates the `.editorconfig` file
- Will correct the order of elements in the `composer.json` file to match
the [official schema](https://github.com/composer/composer/blob/main/res/composer-schema.json).
- Corrects the code style of your project.

```yml
name: Code Style

on: [ push, pull_request ]

permissions: write-all

jobs:
check:
uses: TheDragonCode/.github/.github/workflows/code-style.yml@main
```

### Other CI/CD

```bash
Expand Down