Remove extra PHP config, will it now run on 8.0? #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: php-simple-build | |
on: | |
push: | |
paths: | |
- 'php-simple/**' | |
- '.github/workflows/php-simple-build.yml' | |
pull_request: | |
paths: | |
- 'php-simple/**' | |
- '.github/workflows/php-simple-build.yml' | |
jobs: | |
build: | |
defaults: | |
run: | |
working-directory: ./php-simple | |
runs-on: ubuntu-latest | |
env: | |
DB_USER: root | |
DB_OLD_PASSWORD: root | |
DB_PASSWORD: mysql | |
strategy: | |
matrix: | |
php-version: ["7.3", "8.0", "8.2"] | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Start MYSQL and import DB | |
run: | | |
sudo systemctl start mysql | |
mysqladmin --user=${{ env.DB_USER }} --password=${{ env.DB_OLD_PASSWORD }} password ${{ env.DB_PASSWORD }} | |
mysql -u${{ env.DB_USER }} -p${{ env.DB_PASSWORD }} < ${GITHUB_WORKSPACE}/database/initDatabase.sql | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-version }} | |
- name: Set up dependencies | |
run: composer update | |
- name: Test | |
run: ./vendor/bin/phpunit |