Skip to content
This repository has been archived by the owner on Dec 18, 2024. It is now read-only.

Fixed PS 9 install, update with current develop branch #231

Fixed PS 9 install, update with current develop branch

Fixed PS 9 install, update with current develop branch #231

Workflow file for this run

name: Unit test
on: [push]
jobs:
# Run PHPUnit against the module and a PrestaShop release
phpunit:
name: PHPUnit
runs-on: ubuntu-latest
strategy:
matrix:
presta-versions: ['1.7.8.7']
steps:
- name: Checkout
uses: actions/checkout@v2.0.0
# Add vendor folder in cache to make next builds faster
- name: Cache vendor folder
uses: actions/cache@v2
with:
path: vendor
key: php-${{ hashFiles('composer.lock') }}
# Add composer local folder in cache to make next builds faster
- name: Cache composer folder
uses: actions/cache@v2
with:
path: ~/.composer/cache
key: php-composer-cache
- run: composer update --ignore-platform-reqs
# Get Docker images 202ecommerce/prestashop
- name: Get PrestaShop 202 Image (Tag ${{ matrix.presta-versions }})
run: docker run -tid --rm -v $PWD:/var/www/html/modules/axeptiocookies -e TEST_ID_CONFIGURATION=${{ secrets.TEST_ID_CONFIGURATION }} -e TEST_ID_PROJECT=${{ secrets.TEST_ID_PROJECT }} --name temp-unittest-ps 202ecommerce/prestashop:${{ matrix.presta-versions }}
# Clear previous instance of the module in the PrestaShop volume
- name: Install module and play unit test
run: docker exec -t temp-unittest-ps sh /var/www/html/modules/axeptiocookies/202/docker/run_for_unittest.sh
# Copy coverage report from container to local
- name: Copy coverage report from container to local
run: |
docker cp temp-unittest-ps:/var/www/html/modules/axeptiocookies/202/build/clover.xml $PWD
sed -i 's@'/var/www/html/modules/axeptiocookies/'@/github/workspace/@g' clover.xml
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}