Continuous Integration #202
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
name: Continuous Integration | |
"on": | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
schedule: | |
- cron: "0 0 * * MON" | |
permissions: | |
contents: read | |
packages: read | |
env: | |
# Fix for symfony/color detection. We know GitHub Actions can handle it | |
ANSICON: 1 | |
CASTOR_CONTEXT: ci | |
jobs: | |
check-dockerfiles: | |
name: Check Dockerfile | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Check php/Dockerfile | |
uses: hadolint/[email protected] | |
with: | |
dockerfile: infrastructure/docker/services/php/Dockerfile | |
ci: | |
name: Continuous Integration | |
runs-on: ubuntu-latest | |
steps: | |
- name: Log in to the Container registry | |
uses: docker/login-action@v2 | |
with: | |
registry: 'ghcr.io' | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- uses: actions/checkout@v4 | |
- name: setup-castor | |
uses: castor-php/[email protected] | |
- name: "Build and start the infrastructure" | |
run: "castor start" | |
- name: "Check PHP coding standards" | |
run: "castor qa:cs --dry-run" | |
- name: "Run PHPStan" | |
run: "castor qa:phpstan" | |
- name: "Run PHPUnit" | |
run: "castor qa:phpunit" |