-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (35 loc) · 941 Bytes
/
test.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
name: Test
on:
push:
branches:
- main
pull_request:
jobs:
test:
strategy:
matrix:
PHP_VERSION: [ '7.3', '7.4', '8.0', '8.1']
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