Open danhuawang opened 1 month ago
name: '[CI]' on: pull_request: branches:
main paths:
'**.sh'
'**.xml'
'helm-chart/**' jobs: linter: runs-on: ubuntu-latest steps:
name: Checkout code uses: actions/checkout@v4
name: Install xmllint run: | sudo apt-get update sudo apt-get install -y libxml2-utils
name: Install shfmt run: | curl -sSLo shfmt https://github.com/mvdan/sh/releases/download/v3.8.0/shfmt_v3.8.0_linux_amd64 && chmod +x shfmt && sudo mv shfmt /usr/local/bin/shfmt
name: Install Helm run: | curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
name: Lint Shell Scripts run: | find . -name '*.sh' -print0 | xargs -0 shfmt -d -i 2
name: Check Helm Chart Templates run: | helm lint charts/*
name: Lint XML Files run: | find . -name '*.xml' -print0 | xargs -0 xmllint --noout
name: Checkout gravitino-playground uses: actions/checkout@v4
uses: KengoTODA/actions-setup-docker-compose@v1 with: version: '2.14.2'
name: Deploy id: deploy timeout-minutes: 40 run: | sudo curl -L https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -o /usr/local/bin/yq sudo chmod +x /usr/local/bin/yq cd ${{ github.workspace }}/gravitino-playground nohup ./playground.sh docker start -y > /tmp/playground.log 2>&1 &
i=0 while [[ ! $(curl -k http://127.0.0.1:8090) || ! $(curl -k http://127.0.0.1:18080/v1/info) && $i -le 300 ]]; do sleep 5 i=$(expr $i + 1) done docker ps if [[ $(curl -k http://127.0.0.1:8090) && $(curl -k http://127.0.0.1:18080/v1/info) ]]; then echo "gravitino and trino are ready to use" else echo "gravitino or trino not ready" exit 1 fi
name: Test sql id: test-sql timeout-minutes: 40 run: | cd ${{ github.workspace }}/gravitino-playground/test bash -x ./runSQLOnPlayground.sh
2. In the github action , run some test cases for smoke test. attachment is an example of running SQL smoke cases.
example.tgz
@unknowntpo Can you help implement this improvement ?
@danhuawang Sure.
name: '[CI]' on: pull_request: branches:
main paths:
'**.sh'
'**.xml'
'helm-chart/**' jobs: linter: runs-on: ubuntu-latest steps:
name: Checkout code uses: actions/checkout@v4
name: Install xmllint run: | sudo apt-get update sudo apt-get install -y libxml2-utils
name: Install shfmt run: | curl -sSLo shfmt https://github.com/mvdan/sh/releases/download/v3.8.0/shfmt_v3.8.0_linux_amd64 && chmod +x shfmt && sudo mv shfmt /usr/local/bin/shfmt
name: Install Helm run: | curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
name: Lint Shell Scripts run: | find . -name '*.sh' -print0 | xargs -0 shfmt -d -i 2
name: Check Helm Chart Templates run: | helm lint charts/*
name: Lint XML Files run: | find . -name '*.xml' -print0 | xargs -0 xmllint --noout
name: Checkout gravitino-playground uses: actions/checkout@v4
uses: KengoTODA/actions-setup-docker-compose@v1 with: version: '2.14.2'
name: Deploy id: deploy timeout-minutes: 40 run: | sudo curl -L https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -o /usr/local/bin/yq sudo chmod +x /usr/local/bin/yq cd ${{ github.workspace }}/gravitino-playground nohup ./playground.sh docker start -y > /tmp/playground.log 2>&1 &
wait for gravitino trino ready to use
name: Test sql id: test-sql timeout-minutes: 40 run: | cd ${{ github.workspace }}/gravitino-playground/test bash -x ./runSQLOnPlayground.sh
example.tgz