Skip to content

Commit

Permalink
Merge branch 'main' of github.com:druidfi/api-platform into run-with-…
Browse files Browse the repository at this point in the history
…stonehenge
  • Loading branch information
back-2-95 committed Nov 27, 2024
2 parents 0cbf93d + 4a6f8e5 commit 6ed70ac
Show file tree
Hide file tree
Showing 20 changed files with 3,013 additions and 1,825 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,12 @@ jobs:
compose.yaml
compose.override.yaml
set: |
*.cache-from=type=gha,scope=${{github.ref}}
*.cache-from=type=gha,scope=refs/heads/main
*.cache-to=type=gha,scope=${{github.ref}},mode=max
php.cache-from=type=gha,scope=php-${{github.ref}}
php.cache-from=type=gha,scope=php-refs/heads/main
php.cache-to=type=gha,scope=php-${{github.ref}},mode=max
pwa.cache-from=type=gha,scope=pwa-${{github.ref}}
pwa.cache-from=type=gha,scope=pwa-refs/heads/main
pwa.cache-to=type=gha,scope=pwa-${{github.ref}},mode=max
-
name: Start services
run: docker compose up --wait --no-build
Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: E2E

on:
push:
branches:
- main
pull_request: ~
workflow_dispatch: ~

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
tests:
name: Tests
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Build Docker images
uses: docker/bake-action@v4
with:
pull: true
load: true
files: |
compose.yaml
compose.override.yaml
set: |
php.cache-from=type=gha,scope=php-${{github.ref}}
php.cache-from=type=gha,scope=php-refs/heads/main
php.cache-to=type=gha,scope=php-${{github.ref}},mode=max
pwa.cache-from=type=gha,scope=pwa-${{github.ref}}
pwa.cache-from=type=gha,scope=pwa-refs/heads/main
pwa.cache-to=type=gha,scope=pwa-${{github.ref}},mode=max
-
name: Start services
run: docker compose -f compose.yaml -f compose.override.yaml up --wait --no-build
-
name: Playwright
run: docker run --network host -w /app -v ./e2e:/app --rm --ipc=host mcr.microsoft.com/playwright:v1.48.1-noble /bin/sh -c 'npm i; npx playwright test;'
12 changes: 8 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,21 @@ jobs:
compose.yaml
compose.override.yaml
set: |
*.cache-from=type=gha,scope=${{github.ref}}
*.cache-from=type=gha,scope=refs/heads/main
*.cache-to=type=gha,scope=${{github.ref}},mode=max
php.cache-from=type=gha,scope=php-${{github.ref}}
php.cache-from=type=gha,scope=php-refs/heads/main
php.cache-to=type=gha,scope=php-${{github.ref}},mode=max
pwa.cache-from=type=gha,scope=pwa-${{github.ref}}
pwa.cache-from=type=gha,scope=pwa-refs/heads/main
pwa.cache-to=type=gha,scope=pwa-${{github.ref}},mode=max
-
name: Update API Platform
run: docker compose run php composer update api-platform/core:${{ inputs.tag }}
run: docker compose run php composer update api-platform/symfony:${{ inputs.tag }} api-platform/doctrine-orm:${{ inputs.tag }}
-
name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
commit-message: 'chore: api-platform ${{ inputs.tag }}'
branch: api-platform-core
title: 'chore: api-platform ${{ inputs.tag }}'
token: ${{ secrets.RELEASE_TOKEN }}
body: 'Updates api-platform/core to ${{ inputs.tag }}'
2 changes: 1 addition & 1 deletion api/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#syntax=docker/dockerfile:1.4
#syntax=docker/dockerfile:1

# Adapted from https://github.com/dunglas/symfony-docker

Expand Down
3 changes: 2 additions & 1 deletion api/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"php": ">=8.2",
"ext-ctype": "*",
"ext-iconv": "*",
"api-platform/core": "^3.2",
"api-platform/doctrine-orm": "^4.0.3",
"api-platform/symfony": "^4.0.8",
"doctrine/doctrine-bundle": "^2.7",
"doctrine/doctrine-migrations-bundle": "^3.2",
"doctrine/orm": "^2.12",
Expand Down
Loading

0 comments on commit 6ed70ac

Please sign in to comment.