Skip to content

Commit

Permalink
Update wordpress.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
charan-happy authored May 24, 2024
1 parent fd8de04 commit eb7eb59
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions .github/workflows/wordpress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,38 @@ jobs:

steps:
- uses: actions/checkout@v2

- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'

- name: Cache Composer dependencies
uses: actions/cache@v2
with:
path: ~/.composer/cache
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Install dependencies
run: cd wordpress-app && composer install
- name: Install PHPUnit
run: composer require --dev phpunit/phpunit
- name: Test
run: vendor/bin/phpunit
run: |
cd wordpress-app
composer install
- name: Run PHPUnit tests
run: |
cd wordpress-app
vendor/bin/phpunit
- name: Dockerhub Login
uses: docker/login-action@v2
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Build Docker image
run: docker build -t ${{ vars.DOCKERHUB_USERNAME }}/wordpress-app ./wordpress-app

- name: Push Docker image
run: docker push ${{ vars.DOCKERHUB_USERNAME }}/wordpress-app

0 comments on commit eb7eb59

Please sign in to comment.