ci: compile and run tests using setup-php #36
Workflow file for this run
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: Run tests locally | |
on: [push, pull_request] | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php-versions: ['8.2'] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: '1.20' | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
ini-file: development | |
ini-values: output_buffering=Off | |
extensions: none | |
coverage: none | |
env: | |
phpts: ts | |
debug: true | |
- run: ls -r /etc/php/ | |
#- name: Update php.ini | |
# run: | | |
# sudo rm -Rf /etc/php/8.2/embed/conf.d/* | |
# sudo echo 'output_buffering=Off' > /etc/php/8.2/embed/php.ini | |
- name: Set include flags | |
run: echo "CGO_CFLAGS=$(php-config --includes)" >> "$GITHUB_ENV" | |
#- name: Setup tmate session | |
# uses: mxschmitt/action-tmate@v3 | |
# with: | |
# limit-access-to-actor: true | |
- name: Run library tests | |
run: go test -race -v ./... | |
- name: Run Caddy module tests | |
working-directory: caddy/ | |
run: go test -race -v ./... |