name: CI on: push: branches: - master tags: - 'v*' pull_request: branches: - master jobs: build: runs-on: ${{ matrix.operating-system }} strategy: matrix: operating-system: [ubuntu-latest] php-versions: ['7.0', '7.1', '7.2', '7.3', '7.4'] name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }} steps: - name: Checkout uses: actions/checkout@v2 - name: Checkout agent test tool uses: actions/checkout@v2 with: repository: apache/skywalking-agent-test-tool path: skywalking-agent-test-tool - name: Setup PHP uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php-versions }} extensions: curl, json - name: Setup java uses: actions/setup-java@v1 with: java-version: 8 - name: Setup maven uses: aahmed-se/setup-maven@v3 with: maven-version: 3.6.1 - name: Setup GO uses: actions/setup-go@v2-beta with: go-version: '^1.13.1' - name: Install library run: sudo apt-get update && sudo apt-get install -y curl libcurl4-openssl-dev - name: Build SkyWalking-PHP run: | phpize ./configure make sudo make install bash -c './build-sky-php-agent.sh' - name: Build SkyWalking mock collector run: | cd skywalking-agent-test-tool mvn package -DskipTests tar zxvf ./dist/skywalking-mock-collector.tar.gz -C ./mock-collector cd ./mock-collector/skywalking-mock-collector nohup bash -c './bin/collector-startup.sh' & bash -c 'response=0; while [ $response -ne 200 ]; do sleep 1; response=$(curl --write-out %{http_code} --silent --output /dev/null http://localhost:12800/receiveData);echo $response;done' - name: Publish Dokcer image if: matrix.php-versions == '7.4' && github.event == 'push' uses: elgohr/Publish-Docker-Github-Action@2.13 with: name: skyapm/skywalking-php username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }}