chore: bump semver from 6.3.0 to 6.3.1 in /pwa #747
Workflow file for this run
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: CI | |
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 | |
permissions: | |
contents: 'read' | |
id-token: 'write' | |
env: | |
PHP_DOCKER_IMAGE: eu.gcr.io/${{ secrets.GKE_PROJECT }}/php:latest | |
CADDY_DOCKER_IMAGE: eu.gcr.io/${{ secrets.GKE_PROJECT }}/caddy:latest | |
PWA_DOCKER_IMAGE: eu.gcr.io/${{ secrets.GKE_PROJECT }}/pwa:latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
# gcloud does not work with Python 3.10 because collections.Mappings was removed in Python 3.10. | |
- uses: actions/setup-python@v4 | |
if: github.repository == 'api-platform/demo' | |
with: | |
python-version: 3.9.15 | |
- name: Auth gcloud | |
if: github.repository == 'api-platform/demo' | |
uses: google-github-actions/auth@v1 | |
with: | |
credentials_json: ${{ secrets.GKE_SA_KEY }} | |
- name: Setup gcloud | |
if: github.repository == 'api-platform/demo' | |
uses: google-github-actions/setup-gcloud@v1 | |
with: | |
project_id: ${{ secrets.GKE_PROJECT }} | |
- name: Configure gcloud | |
if: github.repository == 'api-platform/demo' | |
run: | | |
gcloud --quiet auth configure-docker | |
gcloud container clusters get-credentials api-platform-demo --zone europe-west1-c | |
- name: Pull cache images | |
if: github.repository == 'api-platform/demo' | |
run: | | |
docker pull $PHP_DOCKER_IMAGE || true | |
docker pull $CADDY_DOCKER_IMAGE || true | |
docker pull $PWA_DOCKER_IMAGE || true | |
- name: Pull images | |
run: docker compose pull --ignore-pull-failures || true | |
- name: Start services | |
run: docker compose up --build -d | |
- name: Wait for services | |
run: | | |
while status="$(docker inspect --format="{{if .Config.Healthcheck}}{{print .State.Health.Status}}{{end}}" "$(docker compose ps -q php)")"; do | |
case $status in | |
starting) sleep 1;; | |
healthy) exit 0;; | |
unhealthy) | |
docker compose ps | |
docker compose logs | |
exit 1 | |
;; | |
esac | |
done | |
exit 1 | |
- name: Check HTTP reachability | |
run: curl -v -o /dev/null http://localhost | |
- name: Check API reachability | |
run: curl -vk -o /dev/null https://localhost | |
- name: Check PWA reachability | |
run: "curl -vk -o /dev/null -H 'Accept: text/html' https://localhost" | |
- name: Create test database | |
run: | | |
docker compose exec -T php bin/console -e test doctrine:database:create | |
docker compose exec -T php bin/console -e test doctrine:migrations:migrate --no-interaction | |
- name: PHPUnit | |
run: docker compose exec -T php bin/phpunit | |
- name: Install pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8.6.2 | |
- name: Cache playwright binaries | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/ms-playwright | |
key: ${{ runner.os }}-playwright | |
- name: Install Playwright dependencies | |
working-directory: pwa | |
run: pnpm playwright install | |
- name: Run Playwright | |
working-directory: pwa | |
# use 1 worker to prevent conflict between write and read scenarios | |
run: pnpm exec playwright test --workers=1 | |
- uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
name: playwright-screenshots | |
path: pwa/test-results | |
- name: Doctrine Schema Validator | |
run: docker compose exec -T php bin/console doctrine:schema:validate | |
- name: Psalm | |
run: docker compose exec -T php vendor/bin/psalm | |
# gcloud does not work with Python 3.10 because collections. Mappings were removed in Python 3.10. | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9.15 | |
- name: Setup gcloud | |
uses: google-github-actions/setup-gcloud@v1 | |
- name: Lint Helm | |
run: helm lint ./helm/api-platform/ |