README.md: fix github workflow badge #135
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: "Tests" | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
jobs: | |
test: | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
go: | |
- '1.11' | |
- '1.12' | |
- '1.13' | |
- '1.14' | |
- '1.15' | |
- '1.16' | |
- '1.17' | |
- '1.18' | |
- '1.19' | |
- '1.20' | |
- '1.21' | |
env: | |
# For test to correctly locate the OS's php-fpm | |
TEST_PHPFPM_PATH: /usr/sbin/php-fpm | |
# For backward compatibility | |
GO111MODULE: on | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install Tools for Tests | |
run: sudo apt-get install -y php-fpm python3 python3-venv | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.2' | |
# extensions: imagick, swoole | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Setup Node modules | |
run: | | |
cd ./example/nodejs | |
npm install | |
cd ../.. | |
- name: Setup Python3 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Setup Python3 modules | |
run: | | |
python3 -m pip install --upgrade pip | |
python3 -m pip install -r example/python3/requirements.txt | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go }} | |
- name: Setup Go modules | |
run: | | |
go version | |
go mod download -x || go mod download | |
- name: Run tests | |
run: go test -race ./... | |
- name: Environment Info | |
run: | | |
which php-fpm | |
php-fpm --version | |
php -v | |
php -m | |
node -v | |
npm -v | |
python3 -V | |
python3 -m pip list | |
go version | |
go env |