From 0e876d5aa03ff265e8bd8e69e8072e5052f2f727 Mon Sep 17 00:00:00 2001 From: Teppei Fukuda Date: Mon, 12 Jun 2023 20:39:47 +0900 Subject: [PATCH] ci: bypass the required status checks (#4611) --- .github/workflows/bypass-cla.yaml | 12 +++ .github/workflows/bypass-test.yaml | 31 ++++++ .github/workflows/integration-test.yaml | 133 ------------------------ .github/workflows/test.yaml | 128 ++++++++++++++++++++++- 4 files changed, 170 insertions(+), 134 deletions(-) create mode 100644 .github/workflows/bypass-cla.yaml create mode 100644 .github/workflows/bypass-test.yaml delete mode 100644 .github/workflows/integration-test.yaml diff --git a/.github/workflows/bypass-cla.yaml b/.github/workflows/bypass-cla.yaml new file mode 100644 index 000000000000..93818d08e41b --- /dev/null +++ b/.github/workflows/bypass-cla.yaml @@ -0,0 +1,12 @@ +# This workflow is used to bypass the required status checks in merge queue. +# cf. https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/troubleshooting-required-status-checks +name: CLA +on: + merge_group: + +jobs: + cla: + name: license/cla + runs-on: ubuntu-latest + steps: + - run: 'echo "No test required"' \ No newline at end of file diff --git a/.github/workflows/bypass-test.yaml b/.github/workflows/bypass-test.yaml new file mode 100644 index 000000000000..abf91aff45f6 --- /dev/null +++ b/.github/workflows/bypass-test.yaml @@ -0,0 +1,31 @@ +# This workflow is used to bypass the required status checks. +# cf. https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/troubleshooting-required-status-checks +name: Test +on: + push: + paths: + - '**.md' + - 'docs/**' + - 'mkdocs.yml' + - 'LICENSE' + pull_request: + paths: + - '**.md' + - 'docs/**' + - 'mkdocs.yml' + - 'LICENSE' +jobs: + test: + name: Test + runs-on: ${{ matrix.operating-system }} + strategy: + matrix: + operating-system: [ubuntu-latest, windows-latest, macos-latest] + steps: + - run: 'echo "No test required"' + + integration: + name: Integration Test + runs-on: ubuntu-latest + steps: + - run: 'echo "No test required"' \ No newline at end of file diff --git a/.github/workflows/integration-test.yaml b/.github/workflows/integration-test.yaml deleted file mode 100644 index a3dbb8f36d34..000000000000 --- a/.github/workflows/integration-test.yaml +++ /dev/null @@ -1,133 +0,0 @@ -name: Integration Test -on: - push: - branches: - - main - paths-ignore: - - '**.md' - - 'docs/**' - - 'mkdocs.yml' - - 'LICENSE' - pull_request: - paths-ignore: - - '**.md' - - 'docs/**' - - 'mkdocs.yml' - - 'LICENSE' - merge_group: -jobs: - integration: - name: Integration Test - runs-on: ubuntu-latest - steps: - - name: Check out code into the Go module directory - uses: actions/checkout@v3 - - - name: Set up Go - uses: actions/setup-go@v4 - with: - go-version-file: go.mod - - - name: Install tools - uses: aquaproj/aqua-installer@v2.1.1 - with: - aqua_version: v1.25.0 - - - name: Run integration tests - run: mage test:integration - - k8s-integration: - name: K8s Integration Test - runs-on: ubuntu-latest - steps: - - name: Check out code into the Go module directory - uses: actions/checkout@v3 - - - name: Set up Go - uses: actions/setup-go@v4 - with: - go-version-file: go.mod - - - name: Install tools - uses: aquaproj/aqua-installer@v2.1.1 - with: - aqua_version: v1.25.0 - - - name: Run k8s integration tests - run: mage test:k8s - - module-test: - name: Module Integration Test - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Set up Go - uses: actions/setup-go@v4 - with: - go-version-file: go.mod - - - name: Install tools - uses: aquaproj/aqua-installer@v2.1.1 - with: - aqua_version: v1.25.0 - - - name: Run module integration tests - shell: bash - run: | - mage test:module - - vm-test: - name: VM Integration Test - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Set up Go - uses: actions/setup-go@v4 - with: - go-version-file: go.mod - - name: Install tools - uses: aquaproj/aqua-installer@v2.1.1 - with: - aqua_version: v1.25.0 - - name: Run vm integration tests - run: | - mage test:vm - - build-test: - name: Build Test - runs-on: ${{ matrix.operating-system }} - strategy: - matrix: - operating-system: [ubuntu-latest, windows-latest, macos-latest] - env: - DOCKER_CLI_EXPERIMENTAL: "enabled" - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Set up Go - uses: actions/setup-go@v4 - with: - go-version-file: go.mod - - - name: Determine GoReleaser ID - id: goreleaser_id - shell: bash - run: | - if [ "${{ matrix.operating-system }}" == "windows-latest" ]; then - echo "id=--id build-windows" >> $GITHUB_OUTPUT - elif [ "${{ matrix.operating-system }}" == "macos-latest" ]; then - echo "id=--id build-macos --id build-bsd" >> $GITHUB_OUTPUT - else - echo "id=--id build-linux" >> $GITHUB_OUTPUT - fi - - - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v4 - with: - version: v1.16.2 - args: build --snapshot --clean --timeout 90m ${{ steps.goreleaser_id.outputs.id }} diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index fb7945e44bd7..65fc1eba6241 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -3,7 +3,17 @@ on: push: branches: - main + paths-ignore: + - '**.md' + - 'docs/**' + - 'mkdocs.yml' + - 'LICENSE' pull_request: + paths-ignore: + - '**.md' + - 'docs/**' + - 'mkdocs.yml' + - 'LICENSE' merge_group: jobs: test: @@ -53,4 +63,120 @@ jobs: if: matrix.operating-system == 'ubuntu-latest' - name: Run unit tests - run: mage test:unit \ No newline at end of file + run: mage test:unit + + integration: + name: Integration Test + runs-on: ubuntu-latest + steps: + - name: Check out code into the Go module directory + uses: actions/checkout@v3 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version-file: go.mod + + - name: Install tools + uses: aquaproj/aqua-installer@v2.1.1 + with: + aqua_version: v1.25.0 + + - name: Run integration tests + run: mage test:integration + + k8s-integration: + name: K8s Integration Test + runs-on: ubuntu-latest + steps: + - name: Check out code into the Go module directory + uses: actions/checkout@v3 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version-file: go.mod + + - name: Install tools + uses: aquaproj/aqua-installer@v2.1.1 + with: + aqua_version: v1.25.0 + + - name: Run k8s integration tests + run: mage test:k8s + + module-test: + name: Module Integration Test + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version-file: go.mod + + - name: Install tools + uses: aquaproj/aqua-installer@v2.1.1 + with: + aqua_version: v1.25.0 + + - name: Run module integration tests + shell: bash + run: | + mage test:module + + vm-test: + name: VM Integration Test + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version-file: go.mod + - name: Install tools + uses: aquaproj/aqua-installer@v2.1.1 + with: + aqua_version: v1.25.0 + - name: Run vm integration tests + run: | + mage test:vm + + build-test: + name: Build Test + runs-on: ${{ matrix.operating-system }} + strategy: + matrix: + operating-system: [ubuntu-latest, windows-latest, macos-latest] + env: + DOCKER_CLI_EXPERIMENTAL: "enabled" + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version-file: go.mod + + - name: Determine GoReleaser ID + id: goreleaser_id + shell: bash + run: | + if [ "${{ matrix.operating-system }}" == "windows-latest" ]; then + echo "id=--id build-windows" >> $GITHUB_OUTPUT + elif [ "${{ matrix.operating-system }}" == "macos-latest" ]; then + echo "id=--id build-macos --id build-bsd" >> $GITHUB_OUTPUT + else + echo "id=--id build-linux" >> $GITHUB_OUTPUT + fi + + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v4 + with: + version: v1.16.2 + args: build --snapshot --clean --timeout 90m ${{ steps.goreleaser_id.outputs.id }}