Skip to content

Commit

Permalink
Uniformize the sanity tests for install and productV2, add more data …
Browse files Browse the repository at this point in the history
…in the failure artifact
  • Loading branch information
jolelievre committed Dec 5, 2023
1 parent 9d93854 commit fc62587
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/sanity-productV2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ jobs:
working-directory: ./tests/UI

- uses: actions/upload-artifact@v3
if: ${{ always() }}
if: ${{ failure() }}
with:
name: screenshots-${{ matrix.php }}
path: ./tests/UI/screenshots/
name: failure-${{ matrix.php }}
path: |
./tests/UI/screenshots/
./var/logs
20 changes: 12 additions & 8 deletions .github/workflows/sanity.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
name: UI tests
on: [ push, pull_request ]
permissions:
contents: read # to fetch code (actions/checkout)
concurrency:
group: ${{ github.event_name }}-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
sanity:
permissions:
contents: read # to fetch code (actions/checkout)
runs-on: ubuntu-latest
name: Sanity
strategy:
matrix:
php: [ '7.2', '7.3', '7.4', '8.0', '8.1' ]
fail-fast: false

steps:
- uses: actions/checkout@v3

Expand All @@ -28,6 +23,8 @@ jobs:
mysql-root-password: 'password'
node-version: '16'
npm-version: '7'
ps-auto-install: 'false'
ps-dev-mode: 'false'
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Cache Playwright browsers
Expand All @@ -44,10 +41,17 @@ jobs:
run: npm install && npm run test:sanity:fast-fail
working-directory: ./tests/UI
env:
URL_FO: https://localhost/
DB_NAME: prestashop
DB_PASSWD: password
HEADLESS: true
ENABLE_SSL: true
TAKE_SCREENSHOT_AFTER_FAIL: true

- uses: actions/upload-artifact@v3
if: ${{ always() }}
if: ${{ failure() }}
with:
name: screenshots-${{ matrix.php }}
path: ./tests/UI/screenshots/
name: failure-${{ matrix.php }}
path: |
./tests/UI/screenshots/
./var/logs

0 comments on commit fc62587

Please sign in to comment.