-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add workflow for github actions (#9)
- Loading branch information
Showing
7 changed files
with
480 additions
and
115 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* @sequra/partnerships @sequra/integrations-collaborators | ||
* @ristokekovic |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂ | ||
✂✂✂ REMOVE FROM THIS PART BEFORE SUBMITTING YOUR PULL REQUEST ✂✂✂ | ||
✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂ | ||
|
||
Here are some friendly reminders before submitting your pull request: | ||
|
||
- There should be an issue describing the motivation for this change. | ||
- Everything should be well tested. | ||
- Check that you are not making any intensive/slow queries (provide db explain if necessary). | ||
- Migrations should be safe https://sequra.atlassian.net/wiki/display/EN/Safe+Operations+For+High+Volume+PostgreSQL | ||
|
||
YOU CAN REMOVE THE PARTS OF THE TEMPLATE THAT DO NOT APPLY TO YOUR PULL REQUEST | ||
|
||
✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂ | ||
✂✂✂ REMOVE UP TO THIS PART BEFORE SUBMITTING YOUR PULL REQUEST ✂✂✂ | ||
✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂ | ||
|
||
### What is the goal? | ||
|
||
_Provide a description of the overall goal (you can usually use the one from the issue)_ | ||
|
||
### References | ||
* **Issue:** _jira issue goes here, if suggesting a new feature or change, please discuss it in an issue first_ | ||
* **Related pull-requests:** _list of related pull-requests (comma-separated): #1, #2_ | ||
* **Sentry errors:** _list of links to Sentry errors (comma-separated): link1, link2_ | ||
* **Any other references (AppSignal, Prometheus, ...):** _list of links to other references (comma-separated): link1, link2_ | ||
|
||
### How is it being implemented? | ||
|
||
_Provide a description of the implementation_ | ||
|
||
### Opportunistic refactorings | ||
|
||
_Have you improved the code/app in anyway? Explain what you did._ | ||
|
||
### Caveats | ||
|
||
_If you find any, please describe all the special conditions._ | ||
|
||
### Does it affect (changes or update) any sensitive data? | ||
|
||
_Check [Sensitive data list documentation](../blob/master/docs/sensitive_data/README.md) and [Sensitive data list](../blob/master/docs/sensitive_data/sensitive-data.yml) | ||
|
||
### How is it tested? | ||
|
||
_Automatic tests? Manual tests?_ | ||
|
||
_If it cannot be tested explain why._ | ||
|
||
_Add use cases if specs are incomplete or missing._ | ||
|
||
### How is it going to be deployed? | ||
|
||
_If it does not require anything special, just write "Standard deployment". Otherwise, put the required steps._ | ||
|
||
- [ ] _Step 1_ | ||
- [ ] _Step 2_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: CI | ||
on: push | ||
|
||
concurrency: | ||
# For pull requests, cancel all currently-running jobs for this workflow | ||
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
# Force terminal colors. @see https://www.npmjs.com/package/colors | ||
FORCE_COLOR: 1 | ||
|
||
jobs: | ||
ci: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- uses: actions/checkout@v4 | ||
|
||
- name: Cache Composer dependencies | ||
uses: actions/cache@v4 | ||
id: cache-composer | ||
with: | ||
path: | | ||
vendor | ||
key: composer-${{ hashFiles('composer.json') }} | ||
|
||
- name: Install Composer dependencies | ||
if: steps.cache-composer.outputs.cache-hit != 'true' | ||
run: docker run --rm -v "$(pwd)":/app -w /app composer:latest composer install | ||
|
||
- name: PHP_CodeSniffer | ||
run: docker run --rm -v "$(pwd)":/app -w /app php:7.2-cli-alpine php vendor/bin/phpcs --standard=.phpcs.xml.dist --warning-severity=0 . # Ignore Warnings for now... | ||
|
||
- name: PHPStan | ||
run: docker run --rm -v "$(pwd)":/app -w /app php:7.2-cli-alpine php vendor/bin/phpstan analyse -c phpstan.neon --memory-limit=512M | ||
|
||
- name: Run Tests | ||
run: docker run --rm -v "$(pwd)":/app -w /app php:7.2-cli-alpine php vendor/bin/phpunit --configuration phpunit.xml --testdox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?xml version="1.0"?> | ||
<ruleset name="Integration-Core"> | ||
<rule ref="PSR12"/> | ||
<!-- What to scan --> | ||
<file>.</file> | ||
<exclude-pattern>vendor/</exclude-pattern> | ||
<!-- How to scan --> | ||
<!-- Usage instructions: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Usage --> | ||
<!-- Annotated ruleset: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml --> | ||
<arg value="sp"/> <!-- Show sniff and progress --> | ||
<arg name="basepath" value="./"/><!-- Strip the file paths down to the relevant bit --> | ||
<arg name="colors"/> | ||
<arg name="extensions" value="php"/> | ||
<arg name="parallel" value="8"/><!-- Enables parallel processing when available for faster results. --> | ||
<!-- Rules: Check PHP version compatibility --> | ||
<config name="testVersion" value="7.2-"/> | ||
<rule ref="Generic.Commenting"> | ||
<exclude-pattern>tests/</exclude-pattern> | ||
</rule> | ||
<rule ref="Generic.Commenting.Todo.TaskFound"> | ||
<exclude name="Generic.Commenting.Todo.TaskFound"/> | ||
</rule> | ||
<rule ref="Generic.Commenting.DocComment.MissingShort"> | ||
<exclude name="Generic.Commenting.DocComment.MissingShort"/> | ||
</rule> | ||
<rule ref="Generic.Files.LineLength.TooLong"> | ||
<exclude name="Generic.Files.LineLength.TooLong"/> | ||
</rule> | ||
<rule ref="Squiz.PHP.CommentedOutCode.Found"> | ||
<exclude name="Squiz.PHP.CommentedOutCode.Found"/> | ||
</rule> | ||
<rule ref="Squiz.Commenting.ClassComment.Missing"> | ||
<exclude-pattern>tests/</exclude-pattern> | ||
<exclude-pattern>src/</exclude-pattern> | ||
</rule> | ||
<rule ref="Squiz.Commenting.VariableComment.Missing"> | ||
<exclude-pattern>tests/</exclude-pattern> | ||
<exclude-pattern>src/</exclude-pattern> | ||
</rule> | ||
<rule ref="Squiz.Commenting.FunctionComment.Missing"> | ||
<exclude-pattern>tests/</exclude-pattern> | ||
<exclude-pattern>src/</exclude-pattern> | ||
</rule> | ||
</ruleset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.