Skip to content

Commit

Permalink
test: fix conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
monkeyDluffy6017 committed Oct 25, 2023
2 parents 584710a + 6fa5a89 commit 418bf91
Show file tree
Hide file tree
Showing 694 changed files with 31,779 additions and 11,375 deletions.
20 changes: 20 additions & 0 deletions .asf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,26 @@ github:
dismiss_stale_reviews: true
require_code_owner_reviews: true
required_approving_review_count: 2
release/3.6:
required_pull_request_reviews:
require_code_owner_reviews: true
required_approving_review_count: 2
release/3.5:
required_pull_request_reviews:
require_code_owner_reviews: true
required_approving_review_count: 2
release/3.4:
required_pull_request_reviews:
require_code_owner_reviews: true
required_approving_review_count: 2
release/3.3:
required_pull_request_reviews:
require_code_owner_reviews: true
required_approving_review_count: 2
release/3.2:
required_pull_request_reviews:
require_code_owner_reviews: true
required_approving_review_count: 2
release/3.1:
required_pull_request_reviews:
require_code_owner_reviews: true
Expand Down
1 change: 1 addition & 0 deletions .github/actions/autocorrect
Submodule autocorrect added at 2aefca
69 changes: 44 additions & 25 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,10 @@ jobs:
- ubuntu-20.04
os_name:
- linux_openresty
- linux_openresty_1_19
test_dir:
- t/plugin/[a-k]*
- t/plugin/[l-z]*
- t/admin t/cli t/config-center-yaml t/control t/core t/debug t/deployment t/discovery t/error_page t/misc
- t/admin t/cli t/config-center-yaml t/control t/core t/debug t/discovery t/error_page t/misc
- t/node t/pubsub t/router t/script t/secret t/stream-node t/utils t/wasm t/xds-library t/xrpc

runs-on: ${{ matrix.platform }}
Expand All @@ -43,12 +42,12 @@ jobs:

steps:
- name: Check out code
uses: actions/checkout@v3.2.0
uses: actions/checkout@v4
with:
submodules: recursive

- name: Setup Go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version: "1.17"

Expand Down Expand Up @@ -83,6 +82,10 @@ jobs:
echo "type=last" >>$GITHUB_OUTPUT
fi
- name: Free disk space
run: |
bash ./ci/free_disk_space.sh
- name: Linux launch common services
run: |
make ci-env-up project_compose_ci=ci/pod/docker-compose.common.yml
Expand All @@ -99,32 +102,41 @@ jobs:
rm -rf $(ls -1 --ignore=*.tgz --ignore=ci --ignore=t --ignore=utils --ignore=.github)
tar zxvf ${{ steps.branch_env.outputs.fullname }}
- name: Start CI env (FIRST_TEST)
if: steps.test_env.outputs.type == 'first'
run: |
# launch deps env
make ci-env-up project_compose_ci=ci/pod/docker-compose.${{ steps.test_env.outputs.type }}.yml
- name: Cache images
id: cache-images
uses: actions/cache@v3
env:
cache-name: cache-apisix-docker-images
with:
path: docker-images-backup
key: ${{ runner.os }}-${{ env.cache-name }}-${{ steps.test_env.outputs.type }}-${{ hashFiles(format('./ci/pod/docker-compose.{0}.yml', steps.test_env.outputs.type )) }}

- name: Start CI env (PLUGIN_TEST)
if: steps.test_env.outputs.type == 'plugin'
- if: ${{ steps.cache-images.outputs.cache-hit == 'true' }}
name: Load saved docker images
run: |
# download keycloak cas provider
sudo wget https://github.com/jacekkow/keycloak-protocol-cas/releases/download/18.0.2/keycloak-protocol-cas-18.0.2.jar -O /opt/keycloak-protocol-cas-18.0.2.jar
./ci/pod/openfunction/build-function-image.sh
make ci-env-up project_compose_ci=ci/pod/docker-compose.${{ steps.test_env.outputs.type }}.yml
sudo ./ci/init-${{ steps.test_env.outputs.type }}-test-service.sh
- name: Start CI env (LAST_TEST)
if: steps.test_env.outputs.type == 'last'
if [[ -f docker-images-backup/apisix-images.tar ]]; then
[[ ${{ steps.test_env.outputs.type }} != first ]] && sudo ./ci/init-${{ steps.test_env.outputs.type }}-test-service.sh before
docker load --input docker-images-backup/apisix-images.tar
echo "loaded docker images"
# preserve storage space
rm docker-images-backup/apisix-images.tar
make ci-env-up project_compose_ci=ci/pod/docker-compose.${{ steps.test_env.outputs.type }}.yml
if [[ ${{ steps.test_env.outputs.type }} != first ]]; then
sudo ./ci/init-${{ steps.test_env.outputs.type }}-test-service.sh after
fi
fi
- if: ${{ steps.cache-images.outputs.cache-hit != 'true' }}
name: Linux launch services
run: |
# generating SSL certificates for Kafka
sudo keytool -genkeypair -keyalg RSA -dname "CN=127.0.0.1" -alias 127.0.0.1 -keystore ./ci/pod/kafka/kafka-server/selfsigned.jks -validity 365 -keysize 2048 -storepass changeit
[[ ${{ steps.test_env.outputs.type }} != first ]] && sudo ./ci/init-${{ steps.test_env.outputs.type }}-test-service.sh before
[[ ${{ steps.test_env.outputs.type }} == plugin ]] && ./ci/pod/openfunction/build-function-image.sh
make ci-env-up project_compose_ci=ci/pod/docker-compose.${{ steps.test_env.outputs.type }}.yml
sudo ./ci/init-${{ steps.test_env.outputs.type }}-test-service.sh
[[ ${{ steps.test_env.outputs.type }} != first ]] && sudo ./ci/init-${{ steps.test_env.outputs.type }}-test-service.sh after
echo "Linux launch services, done."
- name: Start Dubbo Backend
if: matrix.os_name == 'linux_openresty' && steps.test_env.outputs.type == 'plugin'
if: matrix.os_name == 'linux_openresty' && (steps.test_env.outputs.type == 'plugin' || steps.test_env.outputs.type == 'last')
run: |
sudo apt install -y maven
cd t/lib/dubbo-backend
Expand Down Expand Up @@ -158,3 +170,10 @@ jobs:
env:
TEST_FILE_SUB_DIR: ${{ matrix.test_dir }}
run: sudo -E ./ci/${{ matrix.os_name }}_runner.sh script

- if: ${{ steps.cache-images.outputs.cache-hit != 'true' }}
name: Save docker images
run: |
echo "start backing up, $(date)"
bash ./ci/backup-docker-images.sh ${{ steps.test_env.outputs.type }}
echo "backup done, $(date)"
61 changes: 40 additions & 21 deletions .github/workflows/centos7-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ jobs:
test_dir:
- t/plugin/[a-k]*
- t/plugin/[l-z]*
- t/admin t/cli t/config-center-yaml t/control t/core t/debug t/deployment t/discovery t/error_page t/misc
- t/admin t/cli t/config-center-yaml t/control t/core t/debug t/discovery t/error_page t/misc
- t/node t/pubsub t/router t/script t/secret t/stream-node t/utils t/wasm t/xds-library

steps:
- name: Check out code
uses: actions/checkout@v3.2.0
uses: actions/checkout@v4
with:
submodules: recursive

Expand Down Expand Up @@ -69,6 +69,10 @@ jobs:
echo "type=last" >>$GITHUB_OUTPUT
fi
- name: Free disk space
run: |
bash ./ci/free_disk_space.sh
- name: Linux launch common services
run: |
make ci-env-up project_compose_ci=ci/pod/docker-compose.common.yml
Expand Down Expand Up @@ -100,31 +104,39 @@ jobs:
env:
TEST_FILE_SUB_DIR: ${{ matrix.test_dir }}
run: |
docker run -itd -v /home/runner/work/apisix/apisix:/apisix --env TEST_FILE_SUB_DIR="$TEST_FILE_SUB_DIR" --name centos7Instance --net="host" --dns 8.8.8.8 --dns-search apache.org docker.io/centos:7 /bin/bash
docker run -itd -v ${{ github.workspace }}:/apisix --env TEST_FILE_SUB_DIR="$TEST_FILE_SUB_DIR" --name centos7Instance --net="host" --dns 8.8.8.8 --dns-search apache.org docker.io/centos:7 /bin/bash
# docker exec centos7Instance bash -c "cp -r /tmp/apisix ./"
- name: Start CI env (FIRST_TEST)
if: steps.test_env.outputs.type == 'first'
run: |
make ci-env-up project_compose_ci=ci/pod/docker-compose.${{ steps.test_env.outputs.type }}.yml
- name: Cache images
id: cache-images
uses: actions/cache@v3
env:
cache-name: cache-apisix-docker-images
with:
path: docker-images-backup
key: ${{ runner.os }}-${{ env.cache-name }}-${{ steps.test_env.outputs.type }}-${{ hashFiles(format('./ci/pod/docker-compose.{0}.yml', steps.test_env.outputs.type )) }}

- name: Start CI env (PLUGIN_TEST)
if: steps.test_env.outputs.type == 'plugin'
- if: ${{ steps.cache-images.outputs.cache-hit == 'true' }}
name: Load saved docker images
run: |
# download keycloak cas provider
sudo wget https://github.com/jacekkow/keycloak-protocol-cas/releases/download/18.0.2/keycloak-protocol-cas-18.0.2.jar -O /opt/keycloak-protocol-cas-18.0.2.jar
./ci/pod/openfunction/build-function-image.sh
make ci-env-up project_compose_ci=ci/pod/docker-compose.${{ steps.test_env.outputs.type }}.yml
./ci/init-${{ steps.test_env.outputs.type }}-test-service.sh
- name: Start CI env (LAST_TEST)
if: steps.test_env.outputs.type == 'last'
if [[ -f docker-images-backup/apisix-images.tar ]]; then
[[ ${{ steps.test_env.outputs.type }} != first ]] && sudo ./ci/init-${{ steps.test_env.outputs.type }}-test-service.sh before
docker load --input docker-images-backup/apisix-images.tar
rm docker-images-backup/apisix-images.tar
make ci-env-up project_compose_ci=ci/pod/docker-compose.${{ steps.test_env.outputs.type }}.yml
echo "loaded docker images"
if [[ ${{ steps.test_env.outputs.type }} != first ]]; then
sudo ./ci/init-${{ steps.test_env.outputs.type }}-test-service.sh after
fi
fi
- if: ${{ steps.cache-images.outputs.cache-hit != 'true' }}
name: Linux launch services
run: |
# generating SSL certificates for Kafka
keytool -genkeypair -keyalg RSA -dname "CN=127.0.0.1" -alias 127.0.0.1 -keystore ./ci/pod/kafka/kafka-server/selfsigned.jks -validity 365 -keysize 2048 -storepass changeit
[[ ${{ steps.test_env.outputs.type }} != first ]] && sudo ./ci/init-${{ steps.test_env.outputs.type }}-test-service.sh before
[[ ${{ steps.test_env.outputs.type }} == plugin ]] && ./ci/pod/openfunction/build-function-image.sh
make ci-env-up project_compose_ci=ci/pod/docker-compose.${{ steps.test_env.outputs.type }}.yml
./ci/init-${{ steps.test_env.outputs.type }}-test-service.sh
[[ ${{ steps.test_env.outputs.type }} != first ]] && sudo ./ci/init-${{ steps.test_env.outputs.type }}-test-service.sh after
echo "Linux launch services, done."
- name: Install dependencies
run: |
Expand All @@ -141,3 +153,10 @@ jobs:
- name: Run test cases
run: |
docker exec centos7Instance bash -c "cd apisix && ./ci/centos7-ci.sh run_case"
- if: ${{ steps.cache-images.outputs.cache-hit != 'true' }}
name: Save docker images
run: |
echo "start backing up, $(date)"
bash ./ci/backup-docker-images.sh ${{ steps.test_env.outputs.type }}
echo "backup done, $(date)"
4 changes: 2 additions & 2 deletions .github/workflows/chaos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 35
steps:
- uses: actions/checkout@v3.2.0
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Setup go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version: "1.17"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cli-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:

steps:
- name: Check out code
uses: actions/checkout@v3.2.0
uses: actions/checkout@v4
with:
submodules: recursive

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ jobs:
- linux_apisix_current_luarocks_in_customed_nginx

runs-on: ${{ matrix.platform }}
timeout-minutes: 15
timeout-minutes: 30
env:
SERVER_NAME: ${{ matrix.job_name }}
OPENRESTY_VERSION: default

steps:
- name: Check out code
uses: actions/checkout@v3.2.0
uses: actions/checkout@v4
with:
submodules: recursive

Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/close-unresponded.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Check Issues

on:
workflow_dispatch:
schedule:
- cron: '0 10 * * *'

permissions:
contents: read

jobs:
prune_stale:
permissions:
issues: write # for actions/stale to close stale issues
name: Prune Unresponded
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- name: Prune Stale
uses: actions/stale@v8
with:
days-before-issue-stale: 14
days-before-issue-close: 3
stale-issue-message: >
Due to lack of the reporter's response this issue has been labeled with "no response".
It will be close in 3 days if no further activity occurs. If this issue is still
relevant, please simply write any comment. Even if closed, you can still revive the
issue at any time or discuss it on the dev@apisix.apache.org list.
Thank you for your contributions.
close-issue-message: >
This issue has been closed due to lack of activity. If you think that
is incorrect, or the issue requires additional review, you can revive the issue at
any time.
# Issues with these labels will never be considered stale.
only-labels: 'wait for update'
stale-issue-label: 'no response'
ascending: true
6 changes: 3 additions & 3 deletions .github/workflows/code-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3.2.0
- uses: actions/checkout@v4
- name: Install
run: |
. ./ci/common.sh
Expand All @@ -37,12 +37,12 @@ jobs:
timeout-minutes: 5
steps:
- name: Checkout code
uses: actions/checkout@v3.2.0
uses: actions/checkout@v4

- name: Shellcheck code
run: |
scversion="latest"
wget -O- "https://github.com/koalaman/shellcheck/releases/download/${scversion?}/shellcheck-${scversion?}.linux.x86_64.tar.xz" | tar -xJv
wget -qO- "https://github.com/koalaman/shellcheck/releases/download/${scversion?}/shellcheck-${scversion?}.linux.x86_64.tar.xz" | tar -xJv
cp -av "shellcheck-${scversion}/shellcheck" /usr/local/bin/
shellcheck --version
git ls-files -- "*.sh" | xargs -t shellcheck
31 changes: 15 additions & 16 deletions .github/workflows/doc-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ name: Doc Lint
on:
push:
paths:
- 'docs/**'
- '**/*.md'
- "docs/**"
- "**/*.md"
pull_request:
branches: [master, 'release/**']
branches: [master, "release/**"]
paths:
- 'docs/**'
- '**/*.md'
- "docs/**"
- "**/*.md"

permissions:
contents: read
Expand All @@ -20,11 +20,11 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 1
steps:
- uses: actions/checkout@v3.2.0
- uses: actions/checkout@v4
- name: 🚀 Use Node.js
uses: actions/setup-node@v3.5.1
uses: actions/setup-node@v3.8.1
with:
node-version: '12.x'
node-version: "12.x"
- run: npm install -g markdownlint-cli@0.25.0
- run: markdownlint '**/*.md'
- name: check category
Expand All @@ -47,11 +47,10 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 1
steps:
- uses: actions/checkout@v3.2.0
- name: check Chinese copywriting
run: |
version=v1.5.6
wget -O- "https://github.com/huacnlee/autocorrect/releases/download/$version/autocorrect-linux-amd64.tar.gz" | tar -xzv
mv -v autocorrect /usr/local/bin/
autocorrect --version
git ls-files -- "docs/zh/latest/**.md" | xargs -t autocorrect --lint
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Check Chinese copywriting
uses: ./.github/actions/autocorrect
with:
args: autocorrect --lint --no-diff-bg-color ./docs/zh/latest/
Loading

0 comments on commit 418bf91

Please sign in to comment.