-
Notifications
You must be signed in to change notification settings - Fork 6
37 lines (32 loc) · 1.41 KB
/
phpunit.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Unit test
on: [pull_request]
jobs:
# Run PHPUnit against the module and a PrestaShop release
phpunit:
name: PHPUnit
runs-on: ubuntu-latest
strategy:
matrix:
presta-versions: ['8.1.5']
steps:
- name: Checkout
uses: actions/[email protected]
# Add vendor folder in cache to make next builds faster
- name: Cache vendor folder
uses: actions/cache@v4
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@v4
with:
path: ~/.composer/cache
key: php-composer-cache
- run: composer update
# 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/shoppingfeed --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/shoppingfeed/202/docker/run_for_unittest.sh