Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add npm build steps for GitHub Actions #6221

Merged
merged 2 commits into from
Jun 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ jobs:
- name: Initialize Composer
uses: ./.github/actions/composer

- name: Build Sass and JavaScript
run: |
npm ci
npm run build

- name: Setup to EC-CUBE
env:
APP_ENV: ${{ matrix.app_env }}
Expand Down Expand Up @@ -152,12 +157,31 @@ jobs:
sed -i "s|%GITHUB_WORKSPACE%|${GITHUB_WORKSPACE}|g" codeception/_envs/github_action.yml
vendor/bin/codecept -vvv run acceptance --env chrome,github_action -g ${GROUP} --html report.html

- name: Get a ScreenShots
run: |
php -S 127.0.0.1:8000 &
echo 'google-chrome --headless --no-sandbox --disable-gpu --screenshot=$1 --virtual-time-budget=10000 $2' > take_screenshot.sh
sudo sh take_screenshot.sh front_top.png http://127.0.0.1:8000
sudo sh take_screenshot.sh admin_top.png http://127.0.0.1:8000/admin

- name: Upload evidence
if: failure()
uses: actions/upload-artifact@v4
with:
name: codeception-${{ matrix.group }}-evidence
path: codeception/_output/

- name: List files in current directory
run: ls -la

- name: Upload ScreenShots
uses: actions/upload-artifact@v4
with:
name: screenshots-${{ matrix.group }}
path: |
front_top.png
admin_top.png

- name: Upload logs
if: failure()
uses: actions/upload-artifact@v4
Expand Down
Loading