From 9e81cbd7341c9f92f416ece0a6fb2155b257655b Mon Sep 17 00:00:00 2001 From: Yuki Iwai Date: Tue, 25 Aug 2026 18:24:54 +0900 Subject: [PATCH] Add workflows to exexute tests in CI Signed-off-by: Yuki Iwai --- .github/workflows/ci.yml | 133 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 133 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..fc16e098c --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,133 @@ +name: CI + +on: + pull_request: + push: + branches: + - pfn-dev + - "v*-devel" + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + +env: + ARTIFACTS: ${{ github.workspace }}/_artifacts + +jobs: + verify: + name: make verify + runs-on: ubuntu-latest + timeout-minutes: 60 + steps: + - name: Checkout + uses: actions/checkout@v7 + - name: Set up Go + uses: actions/setup-go@v7 + with: + go-version-file: go.mod + - name: Run verification + run: make verify + + unit-test: + name: make test + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - name: Checkout + uses: actions/checkout@v7 + - name: Set up Go + uses: actions/setup-go@v7 + with: + go-version-file: go.mod + - name: Run unit tests + run: | + mkdir -p "${ARTIFACTS}" + make test + - name: Upload test artifacts + if: always() + uses: actions/upload-artifact@v7 + with: + name: unit-test-artifacts + path: ${{ env.ARTIFACTS }} + if-no-files-found: ignore + retention-days: 3 + overwrite: true + + integration-test: + name: make test-integration + runs-on: ubuntu-latest + timeout-minutes: 60 + steps: + - name: Checkout + uses: actions/checkout@v7 + - name: Set up Go + uses: actions/setup-go@v7 + with: + go-version-file: go.mod + - name: Run integration tests + run: | + mkdir -p "${ARTIFACTS}" + make test-integration + - name: Upload test artifacts + if: always() + uses: actions/upload-artifact@v7 + with: + name: integration-test-artifacts + path: ${{ env.ARTIFACTS }} + if-no-files-found: ignore + retention-days: 3 + overwrite: true + + e2e-test: + name: make test-e2e-kind + runs-on: ubuntu-latest + timeout-minutes: 90 + steps: + - name: Checkout + uses: actions/checkout@v7 + - name: Set up Go + uses: actions/setup-go@v7 + with: + go-version-file: go.mod + - name: Run E2E tests + run: | + mkdir -p "${ARTIFACTS}" + E2E_KIND_VERSION=kindest/node:v1.36.1 make test-e2e-kind + - name: Upload test artifacts + if: always() + uses: actions/upload-artifact@v7 + with: + name: e2e-test-artifacts + path: ${{ env.ARTIFACTS }} + if-no-files-found: ignore + retention-days: 3 + overwrite: true + + e2e-scheduling-test: + name: make test-e2e-kind-scheduling + runs-on: ubuntu-latest + timeout-minutes: 90 + steps: + - name: Checkout + uses: actions/checkout@v7 + - name: Set up Go + uses: actions/setup-go@v7 + with: + go-version-file: go.mod + - name: Run scheduling E2E tests + run: | + mkdir -p "${ARTIFACTS}" + make test-e2e-kind-scheduling + - name: Upload test artifacts + if: always() + uses: actions/upload-artifact@v7 + with: + name: e2e-scheduling-test-artifacts + path: ${{ env.ARTIFACTS }} + if-no-files-found: ignore + retention-days: 3 + overwrite: true