From 9513f1affafbac2a7fc4a0a62262de16b52fc3bf Mon Sep 17 00:00:00 2001 From: Jiaxun Song Date: Tue, 17 Oct 2023 00:07:08 +0000 Subject: [PATCH] add GitHub workflows --- .github/workflows/ci.yml | 73 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..b1eb6d0ef --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,73 @@ +name: ci + +on: + push: + branches: + - main + - 'release-*' + pull_request: + branches: + - '*' + +jobs: + build: + runs-on: ubuntu-20.04 + timeout-minutes: 10 + steps: + - name: Checkout repo + uses: actions/checkout@v4 + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version-file: './go.mod' + check-latest: true + - name: Build CSI driver + run: make driver + - name: Build sidecar mounter + run: make sidecar-mounter + - name: Build webhook + run: make webhook + - name: Build e2e test binary + run: go build -mod=vendor ./test/e2e + + unit-test: + runs-on: ubuntu-20.04 + timeout-minutes: 10 + steps: + - name: Checkout repo + uses: actions/checkout@v4 + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version-file: './go.mod' + check-latest: true + - name: Test + run: make unit-test + + sanity-test: + runs-on: ubuntu-20.04 + timeout-minutes: 10 + steps: + - name: Checkout repo + uses: actions/checkout@v4 + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version-file: './go.mod' + check-latest: true + - name: Test + run: make sanity-test + + verify: + runs-on: ubuntu-20.04 + timeout-minutes: 10 + steps: + - name: Checkout repo + uses: actions/checkout@v4 + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version-file: './go.mod' + check-latest: true + - name: Verify + run: make verify \ No newline at end of file