Test current php versions #20
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: Test | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
test: | |
strategy: | |
matrix: | |
PHP_VERSION: [ '8.1', '8.3', '8.4' ] | |
name: Test Apache action | |
runs-on: ubuntu-latest | |
steps: | |
- name: Create fake site | |
run: | | |
mkdir /tmp/sut | |
echo '<?php' | sudo tee /tmp/sut/index.php | |
echo ' $text = "It works!";' | sudo tee -a /tmp/sut/index.php | |
echo ' print "<strong>$text</strong>";' | sudo tee -a /tmp/sut/index.php | |
shell: bash | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.PHP_VERSION }} | |
- uses: actions/checkout@v2 | |
- name: Setup Apache | |
uses: ./ | |
with: | |
php-version: ${{ matrix.PHP_VERSION }} | |
site-directory: /tmp/sut | |
http-port: 9090 | |
- name: Test fake site | |
run: | | |
curl -sSf http://127.0.0.1:9090 |