avoid buffer-size larger than memory limit (#742) #1393
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: CI | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- 'Makefile' | |
- 'docker/*' | |
- '**.go' | |
- '**.py' | |
- '**.sh' | |
- '**.mod' | |
- '**.sum' | |
pull_request: | |
branches: | |
- master | |
paths: | |
- 'Makefile' | |
- 'docker/*' | |
- '**.go' | |
- '**.py' | |
- '**.sh' | |
- '**.mod' | |
- '**.sum' | |
workflow_dispatch: | |
inputs: | |
debug: | |
type: boolean | |
description: "Run the build with tmate debugging enabled" | |
required: false | |
default: false | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go 1.18.x | |
uses: actions/setup-go@v2 | |
with: | |
go-version: '1.18.x' | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v2 | |
- name: Build | |
run: make | |
- name: Verify | |
run: make verify | |
- name: Test | |
run: make test | |
- name: Test sanity | |
run: make test-sanity | |
- name: Coverage File | |
run: | | |
pwd | |
cat cov1.out >> coverage.txt | |
cat cov2.out >> coverage.txt | |
- name: Code Coverage | |
uses: codecov/codecov-action@v1 | |
with: | |
files: ./coverage.txt | |
build-matrix: | |
runs-on: ubuntu-latest | |
steps: | |
- id: set-matrix | |
run: | | |
sudo apt-get install jq | |
testmode=("pod" "pod-mount-share" "pod-provisioner" "webhook" "webhook-provisioner" "process") | |
value=`printf '%s\n' "${testmode[@]}" | jq -R . | jq -cs .` | |
echo "value: $value" | |
echo "matrix=$value" >> $GITHUB_OUTPUT | |
wtestmode=("pod" "pod-mount-share" "pod-provisioner") | |
value=`printf '%s\n' "${wtestmode[@]}" | jq -R . | jq -cs .` | |
echo "value without kubelet: $value" | |
echo "wmatrix=$value" >> $GITHUB_OUTPUT | |
outputs: | |
matrix: ${{ steps.set-matrix.outputs.matrix }} | |
wmatrix: ${{ steps.set-matrix.outputs.wmatrix }} | |
e2e-ce-without-kubelet-test: | |
runs-on: ubuntu-latest | |
needs: build-matrix | |
strategy: | |
fail-fast: false | |
matrix: | |
testmode: ${{ fromJson(needs.build-matrix.outputs.wmatrix) }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Prepare microk8s environment | |
run: ${GITHUB_WORKSPACE}/.github/scripts/k8s-deps.sh | |
- name: Build image | |
env: | |
DEV_K8S: microk8s | |
run: | | |
cd ${GITHUB_WORKSPACE} | |
make image-dev | |
make push-dev | |
- name: Deploy JuiceFS CSI | |
run: | | |
testmode=${{matrix.testmode}} | |
cd ${GITHUB_WORKSPACE} | |
dev_tag=dev-$(git describe --always) | |
echo "Dev tag is: " $dev_tag | |
export dev_tag=$dev_tag | |
.github/scripts/deploy-csi-in-k8s.sh ${testmode} withoutkubelet | |
- name: Run e2e test | |
env: | |
JUICEFS_STORAGE: s3 | |
JUICEFS_BUCKET: "http://juicefs-bucket.minio.default.svc.cluster.local:9000" | |
JUICEFS_ACCESS_KEY: "minioadmin" | |
JUICEFS_SECRET_KEY: "minioadmin" | |
JUICEFS_NAME: "ce-secret" | |
JUICEFS_META_URL: "redis://redis.default.svc.cluster.local:6379/1" | |
JUICEFS_MODE: ce | |
TEST_MODE: ${{matrix.testmode}} | |
run: | | |
cd ${GITHUB_WORKSPACE}/.github/scripts/ | |
python3 e2e-test.py | |
- name: Setup upterm session | |
if: ${{ failure() }} | |
timeout-minutes: 60 | |
uses: lhotari/action-upterm@v1 | |
e2e-ee-without-kubelet-test: | |
runs-on: ubuntu-latest | |
needs: build-matrix | |
strategy: | |
fail-fast: false | |
matrix: | |
testmode: ${{ fromJson(needs.build-matrix.outputs.wmatrix) }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Prepare microk8s environment | |
run: ${GITHUB_WORKSPACE}/.github/scripts/k8s-deps.sh | |
- name: Build image | |
env: | |
DEV_K8S: microk8s | |
run: | | |
cd ${GITHUB_WORKSPACE} | |
make image-dev | |
make push-dev | |
- name: Deploy JuiceFS CSI | |
run: | | |
testmode=${{matrix.testmode}} | |
cd ${GITHUB_WORKSPACE} | |
dev_tag=dev-$(git describe --always) | |
echo "Dev tag is: " $dev_tag | |
export dev_tag=$dev_tag | |
.github/scripts/deploy-csi-in-k8s.sh ${testmode} withoutkubelet | |
- name: Run e2e test | |
env: | |
JUICEFS_TOKEN: ${{ secrets.JUICEFS_CI_VOLUME_TOKEN }} | |
JUICEFS_STORAGE: s3 | |
JUICEFS_BUCKET: "http://juicefs-bucket.minio.default.svc.cluster.local:9000" | |
JUICEFS_ACCESS_KEY: "minioadmin" | |
JUICEFS_SECRET_KEY: "minioadmin" | |
JUICEFS_NAME: "csi-ci" | |
JUICEFS_META_URL: "" | |
JUICEFS_MODE: "ee" | |
TEST_MODE: ${{matrix.testmode}} | |
run: | | |
cd ${GITHUB_WORKSPACE}/.github/scripts/ | |
python3 e2e-test.py | |
- name: Setup upterm session | |
if: ${{ failure() }} | |
timeout-minutes: 60 | |
uses: lhotari/action-upterm@v1 | |
e2e-ce-test: | |
runs-on: ubuntu-latest | |
needs: build-matrix | |
strategy: | |
fail-fast: false | |
matrix: | |
testmode: ${{ fromJson(needs.build-matrix.outputs.matrix) }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Prepare microk8s environment | |
run: ${GITHUB_WORKSPACE}/.github/scripts/k8s-deps.sh | |
- name: Build image | |
env: | |
DEV_K8S: microk8s | |
run: | | |
cd ${GITHUB_WORKSPACE} | |
make image-dev | |
make push-dev | |
- name: Deploy JuiceFS CSI | |
run: | | |
testmode=${{matrix.testmode}} | |
cd ${GITHUB_WORKSPACE} | |
dev_tag=dev-$(git describe --always) | |
echo "Dev tag is: " $dev_tag | |
export dev_tag=$dev_tag | |
.github/scripts/deploy-csi-in-k8s.sh ${testmode} | |
- name: Run e2e test | |
env: | |
JUICEFS_STORAGE: s3 | |
JUICEFS_BUCKET: "http://juicefs-bucket.minio.default.svc.cluster.local:9000" | |
JUICEFS_ACCESS_KEY: "minioadmin" | |
JUICEFS_SECRET_KEY: "minioadmin" | |
JUICEFS_NAME: "ce-secret" | |
JUICEFS_META_URL: "redis://redis.default.svc.cluster.local:6379/1" | |
JUICEFS_MODE: ce | |
TEST_MODE: ${{matrix.testmode}} | |
run: | | |
cd ${GITHUB_WORKSPACE}/.github/scripts/ | |
python3 e2e-test.py | |
- name: Setup upterm session | |
if: ${{ failure() }} | |
timeout-minutes: 60 | |
uses: lhotari/action-upterm@v1 | |
e2e-ee-test: | |
runs-on: ubuntu-latest | |
needs: build-matrix | |
strategy: | |
fail-fast: false | |
matrix: | |
testmode: ${{ fromJson(needs.build-matrix.outputs.matrix) }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Prepare microk8s environment | |
run: ${GITHUB_WORKSPACE}/.github/scripts/k8s-deps.sh | |
- name: Build image | |
env: | |
DEV_K8S: microk8s | |
run: | | |
cd ${GITHUB_WORKSPACE} | |
make image-dev | |
make push-dev | |
- name: Deploy JuiceFS CSI | |
run: | | |
testmode=${{matrix.testmode}} | |
cd ${GITHUB_WORKSPACE} | |
dev_tag=dev-$(git describe --always) | |
echo "Dev tag is: " $dev_tag | |
export dev_tag=$dev_tag | |
.github/scripts/deploy-csi-in-k8s.sh ${testmode} | |
- name: Run e2e test | |
env: | |
JUICEFS_TOKEN: ${{ secrets.JUICEFS_CI_VOLUME_TOKEN }} | |
JUICEFS_STORAGE: s3 | |
JUICEFS_BUCKET: "http://juicefs-bucket.minio.default.svc.cluster.local:9000" | |
JUICEFS_ACCESS_KEY: "minioadmin" | |
JUICEFS_SECRET_KEY: "minioadmin" | |
JUICEFS_NAME: "csi-ci" | |
JUICEFS_META_URL: "" | |
JUICEFS_MODE: "ee" | |
TEST_MODE: ${{matrix.testmode}} | |
run: | | |
cd ${GITHUB_WORKSPACE}/.github/scripts/ | |
python3 e2e-test.py | |
- name: Setup upterm session | |
if: ${{ failure() }} | |
timeout-minutes: 60 | |
uses: lhotari/action-upterm@v1 | |
success-all-test: | |
runs-on: ubuntu-latest | |
needs: [ e2e-ce-test, e2e-ee-test ] | |
if: always() | |
steps: | |
- uses: technote-space/workflow-conclusion-action@v3 | |
- uses: actions/checkout@v3 | |
- name: Check Failure | |
if: env.WORKFLOW_CONCLUSION == 'failure' | |
run: exit 1 | |
- name: Success | |
if: ${{ success() }} | |
run: echo "All Done" |