Merge pull request #816 from michielgerritsen/dependabot/npm_and_yarn… #2445
This file contains hidden or 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, pull_request] | |
jobs: | |
ci: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Start Docker container first | |
run: | | |
docker run -d \ | |
--name=magento \ | |
-p 8080:80 \ | |
-e URL=http://localhost:8080/ \ | |
michielgerritsen/magento-project-community-edition:php83-fpm-magento2.4.8-p1 & | |
- name: Checkout 🛎 | |
uses: actions/checkout@v5 | |
- uses: ddev/github-action-setup-ddev@v1 | |
- name: Install dependencies 👨🏻💻 | |
run: ddev yarn install | |
- name: Run linter 👀 | |
run: ddev yarn lint | |
- name: Generate output ⚙️ | |
run: ddev yarn generate | |
- name: Install Playwright 🧪 | |
run: npx playwright install | |
- name: Run Playwright for the frontend tests 🌎 | |
run: | | |
npx playwright test --project=frontend | |
- name: Unzip files | |
run: | | |
unzip -o tests/tmp/MageTested_DataModels_Blog.zip -d tests/tmp/DataModels | |
unzip -o tests/tmp/MageTested_RegularModels_Blog.zip -d tests/tmp/RegularModels | |
- name: Run codesniffer | |
run: | |
docker run | |
--volume $(pwd)/tests/tmp/RegularModels:/app/workdir | |
michielgerritsen/magento-coding-standard:latest | |
--severity=10 | |
-s | |
- name: Upload modules to Docker container | |
run: | | |
docker exec magento mkdir -p app/code/MageTested/ | |
docker cp tests/tmp/DataModels/ magento:/data/app/code/MageTested/DataModels | |
docker cp tests/tmp/RegularModels/ magento:/data/app/code/MageTested/RegularModels | |
docker exec magento php bin/magento module:enable MageTested_DataModels MageTested_RegularModels | |
docker exec magento ./disable-2fa | |
docker exec magento php bin/magento setup:upgrade | |
- name: Run Playwright for the Magento tests 🌎 | |
run: | | |
MAGENTO_BASE_URL=http://localhost:8080/ npx playwright test --project=magento | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: Playwright report | |
path: | | |
playwright-report |