Skip to content

Commit

Permalink
Update GH action workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
pyrech committed Nov 21, 2024
1 parent d44aeac commit 49fcecf
Showing 1 changed file with 36 additions and 17 deletions.
53 changes: 36 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,37 @@
name: Continuous Integration

on:
"on":
push:
branches: [ "main" ]
branches: ["main"]
pull_request:
branches: [ "main" ]
branches: ["main"]
schedule:
- cron: "0 0 * * MON"

permissions:
contents: read

env:
# Fix for symfony/color detection. We know GitHub Actions can handle it
ANSICON: 1
CASTOR_CONTEXT: ci

jobs:
tests:
name: Run the tests suite
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
env:
APP_ENV: 'test'
steps:
# Install official version of docker that correctly supports from-cache option in docker compose
- name: Set up Docker
Expand All @@ -30,20 +47,22 @@ jobs:
shell: bash
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin

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

- name: Setup Castor
- name: setup-castor
uses: castor-php/[email protected]

- name: "Build and start the infrastructure"
run: castor start
run: "castor start"

- name: "Check PHP coding standards"
run: "castor qa:cs"

- name: CS
run: castor cs
- name: "Run PHPStan"
run: "castor qa:phpstan"

- name: PHPStan
run: castor phpstan
- name: "Load fixtures"
run: "castor fixtures"

- name: PHPUnit
run: castor phpunit
- name: "Run PHPUnit"
run: "castor qa:phpunit"

0 comments on commit 49fcecf

Please sign in to comment.