diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml new file mode 100644 index 0000000..f0c1a41 --- /dev/null +++ b/.github/workflows/tests.yaml @@ -0,0 +1,32 @@ +name: CI + +on: + push: + pull_request: + +jobs: + tests: + runs-on: ubuntu-latest + + container: jellybellydev/ci-cd-theory-into-practice:latest + + name: "CI⚡CD: the theory put into practice" + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Install dependencies + run: composer install + + - name: Check php-cs-fixer + run: vendor/bin/php-cs-fixer fix --verbose --diff --dry-run + + - name: Lint yaml config + - run: bin/console lint:yaml config + + - name: Phpunit + - run: XDEBUG_MODE=coverage bin/phpunit --colors=never --coverage-text + + - name: Psalm + - run: vendor/bin/psalm diff --git a/README.md b/README.md index c978282..346a6e1 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,11 @@ ![Logo](./stuff/ci-cd-logo-250.png) # CI⚡CD: the theory put into practice +GitLab: [![pipeline status](https://gitlab.com/JellyBellyDev/ci-cd-theory-into-practice/badges/master/pipeline.svg)](https://gitlab.com/JellyBellyDev/ci-cd-theory-into-practice/-/commits/master) -[![coverage report](https://gitlab.com/JellyBellyDev/ci-cd-theory-into-practice/badges/master/coverage.svg)](https://gitlab.com/JellyBellyDev/ci-cd-theory-into-practice/-/commits/master) +[![coverage report](https://gitlab.com/JellyBellyDev/ci-cd-theory-into-practice/badges/master/coverage.svg)](https://gitlab.com/JellyBellyDev/ci-cd-theory-into-practice/-/commits/master) +GitHub: +![CI](https://github.com/JellyBellyDev/ci-cd-theory-into-practice/workflows/CI/badge.svg) > This is a sample repository to show a possible configuration of a GitLab pipeline and deploy with Ansible for a software written in php with Symfony framework.