|
| 1 | +name: Storybook |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - main |
| 7 | + pull_request: ~ |
| 8 | + workflow_dispatch: ~ |
| 9 | + |
| 10 | +concurrency: |
| 11 | + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} |
| 12 | + cancel-in-progress: true |
| 13 | + |
| 14 | +jobs: |
| 15 | + tests: |
| 16 | + name: Tests |
| 17 | + runs-on: ubuntu-latest |
| 18 | + steps: |
| 19 | + - |
| 20 | + name: Checkout |
| 21 | + uses: actions/checkout@v4 |
| 22 | + - |
| 23 | + name: Set up Docker Buildx |
| 24 | + uses: docker/setup-buildx-action@v3 |
| 25 | + - |
| 26 | + name: Build Docker images |
| 27 | + uses: docker/bake-action@v4 |
| 28 | + with: |
| 29 | + pull: true |
| 30 | + load: true |
| 31 | + files: | |
| 32 | + compose.yaml |
| 33 | + set: | |
| 34 | + *.cache-from=type=gha,scope=${{github.ref}} |
| 35 | + *.cache-from=type=gha,scope=refs/heads/main |
| 36 | + *.cache-to=type=gha,scope=${{github.ref}},mode=max |
| 37 | + - |
| 38 | + name: Start services |
| 39 | + run: docker compose up --wait --no-build |
| 40 | + - |
| 41 | + name: Check HTTP reachability |
| 42 | + run: curl -v --fail-with-body http://localhost |
| 43 | + - |
| 44 | + name: Check API reachability |
| 45 | + run: curl -vk --fail-with-body https://localhost |
| 46 | + - |
| 47 | + name: Check PWA reachability |
| 48 | + run: "curl -vk --fail-with-body -H 'Accept: text/html' https://localhost" |
| 49 | + - |
| 50 | + name: Create test database |
| 51 | + run: docker compose exec -T php bin/console -e test doctrine:database:create |
| 52 | + - |
| 53 | + name: Run migrations |
| 54 | + run: docker compose exec -T php bin/console -e test doctrine:migrations:migrate --no-interaction |
| 55 | + # - |
| 56 | + # name: Doctrine Schema Validator |
| 57 | + # run: docker compose exec -T pwa pnpm run storybook |
| 58 | + lint: |
| 59 | + name: Docker Lint |
| 60 | + runs-on: ubuntu-latest |
| 61 | + steps: |
| 62 | + - |
| 63 | + name: Checkout |
| 64 | + uses: actions/checkout@v4 |
| 65 | + - |
| 66 | + name: Lint Dockerfiles |
| 67 | + uses: hadolint/hadolint-action@v3.1.0 |
| 68 | + with: |
| 69 | + recursive: true |
| 70 | + |
0 commit comments