[5.0]Fix bug #5144 #7271
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: lib-swoole | |
on: [ push, pull_request ] | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
if: "!contains(github.event.head_commit.message, '[test]')" | |
services: | |
tinyproxy: | |
image: "vimagick/tinyproxy" | |
ports: | |
- 8888:8888 | |
socks5: | |
image: "xkuma/socks5" | |
ports: | |
- 1080:1080 | |
env: | |
PROXY_USER: user | |
PROXY_PASSWORD: password | |
PROXY_SERVER: 0.0.0.0:1080 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: install dependencies | |
run: sudo apt update -y && sudo apt install -y googletest libgtest-dev redis-server libboost-stacktrace-dev libbrotli-dev | |
- name: configure | |
run: phpize && ./configure --enable-sockets --enable-mysqlnd --enable-openssl | |
- name: make | |
run: cmake . -DCODE_COVERAGE=ON && | |
make VERBOSE=1 -j && | |
sudo make install | |
- name: make test | |
run: | |
cd core-tests && ./run.sh | |
- name: run coverage | |
shell: bash | |
run: sudo apt-get install lcov && | |
sudo lcov --directory . --capture --output-file coverage.info && | |
sudo lcov --remove coverage.info "${{runner.workspace}}/swoole-src/include/*" '/usr/*' --output-file coverage.info && | |
sudo lcov --list coverage.info | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ./coverage.info | |
fail_ci_if_error: true |