Updated tag key from 'http.status' to 'http.status_code' (#107) #457
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
# Licensed to the Apache Software Foundation (ASF) under one | |
# or more contributor license agreements. See the NOTICE file | |
# distributed with this work for additional information | |
# regarding copyright ownership. The ASF licenses this file | |
# to you under the Apache License, Version 2.0 (the | |
# "License"); you may not use this file except in compliance | |
# with the License. You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, | |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
# See the License for the specific language governing permissions and | |
# limitations under the License. | |
name: CI | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
tags: | |
- 'v*' | |
jobs: | |
CI: | |
runs-on: ubuntu-latest | |
timeout-minutes: 180 | |
strategy: | |
fail-fast: true | |
steps: | |
- uses: actions/checkout@v2 | |
# In the checkout@v2, it doesn't support git submodule. Execute the commands manually. | |
- name: checkout submodules | |
shell: bash | |
run: | | |
git submodule sync --recursive | |
git -c protocol.version=2 submodule update --init --force --recursive --depth=1 | |
- name: Check License Header | |
if: env.SKIP_CI != 'true' | |
uses: apache/skywalking-eyes@main | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: 'Install Lua' | |
shell: bash | |
run: | | |
sudo apt-get update -y | |
sudo apt-get install -y lua5.1 lua5.1-dev | |
- name: 'Install LuaRocks' | |
run: | | |
wget https://luarocks.org/releases/luarocks-3.8.0.tar.gz | |
tar zxpf luarocks-3.8.0.tar.gz | |
cd luarocks-3.8.0 | |
./configure && make && sudo make install | |
cd .. | |
- name: 'Install Dependencies' | |
run: | | |
sudo luarocks install luaunit | |
sudo luarocks install lua-cjson2 | |
sudo luarocks install lua-resty-jit-uuid | |
- name: "Install OpenResty" | |
run: | | |
wget -qO - https://openresty.org/package/pubkey.gpg | sudo apt-key add - | |
sudo apt-get -y update --fix-missing | |
sudo apt-get -y install software-properties-common | |
sudo add-apt-repository -y "deb http://openresty.org/package/ubuntu $(lsb_release -sc) main" | |
sudo apt-get update | |
sudo apt-get install openresty-debug | |
- name: "Install test::nginx for testing" | |
run: | | |
sudo apt-get install -y cpanminus | |
sudo cpanm --notest Test::Nginx >build.log 2>&1 || (cat build.log && exit 1) | |
git clone https://github.com/iresty/test-nginx.git test-nginx | |
- name: 'Run Lua Tests' | |
run: | | |
cd lib | |
/usr/local/openresty-debug/luajit/bin/luajit skywalking/util_test.lua | |
/usr/local/openresty-debug/luajit/bin/luajit skywalking/span_test.lua | |
/usr/local/openresty-debug/luajit/bin/luajit skywalking/tracing_context_test.lua | |
/usr/local/openresty-debug/luajit/bin/luajit skywalking/segment_ref_test.lua | |
/usr/local/openresty-debug/luajit/bin/luajit skywalking/correlation_context_test.lua | |
cd .. | |
- name: 'Run Nginx Lua Tests' | |
run: | | |
export PATH=/usr/local/openresty-debug/nginx/sbin:/usr/local/openresty-debug/luajit/bin:$/usr/local/openresty-debug/bin:$PATH | |
prove -Itest-nginx/lib -r t |