tests.yml 861 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. name: Tests
  2. on: [push, pull_request]
  3. jobs:
  4. tests:
  5. runs-on: ubuntu-latest
  6. strategy:
  7. matrix:
  8. php-versions: ['8.2', '8.3']
  9. steps:
  10. - uses: actions/checkout@v4
  11. - uses: actions/setup-go@v4
  12. with:
  13. go-version: '1.21'
  14. - uses: shivammathur/setup-php@v2
  15. with:
  16. php-version: ${{ matrix.php-versions }}
  17. ini-file: development
  18. extensions: opcache
  19. coverage: none
  20. env:
  21. phpts: ts
  22. - name: Set CGO flags
  23. run: echo "CGO_CFLAGS=$(php-config --includes)" >> "$GITHUB_ENV"
  24. - name: Build
  25. run: go build
  26. env:
  27. GOEXPERIMENT: cgocheck2
  28. - name: Run library tests
  29. run: go test -race -v ./...
  30. - name: Run Caddy module tests
  31. working-directory: caddy/
  32. run: go test -race -v ./...