From fb145808e3c5caf8812a77a4d2a506c0fcb62dd7 Mon Sep 17 00:00:00 2001 From: d-kuro Date: Wed, 28 Sep 2022 05:57:27 +0900 Subject: [PATCH] Add weekly workflows Signed-off-by: d-kuro --- .github/workflows/ci-e2e.yaml | 9 +++-- .github/workflows/weekly.yaml | 68 +++++++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/weekly.yaml diff --git a/.github/workflows/ci-e2e.yaml b/.github/workflows/ci-e2e.yaml index bb6343d6a..449910453 100644 --- a/.github/workflows/ci-e2e.yaml +++ b/.github/workflows/ci-e2e.yaml @@ -12,12 +12,17 @@ on: env: cache-version: 1 +# Use only the LTS version of MySQL for E2E running in CI. +# Other MySQL supported versions tested weekly. +# see: weekly.yaml +# +# NOTE: The LTS version is the version that Cybozu uses internally. jobs: dbtest: name: Integration tests with MySQL strategy: matrix: - mysql-version: ["8.0.18", "8.0.25", "8.0.26", "8.0.27", "8.0.28", "8.0.30"] + mysql-version: ["8.0.18", "8.0.28", "8.0.30"] uses: ./.github/workflows/dbtest.yaml with: mysql-version: ${{ matrix.mysql-version }} @@ -37,7 +42,7 @@ jobs: name: Supported MySQL versions End-to-End Tests strategy: matrix: - mysql-version: ["8.0.18", "8.0.25", "8.0.26", "8.0.27", "8.0.28", "8.0.30"] + mysql-version: ["8.0.18", "8.0.28", "8.0.30"] k8s-version: ["1.24.2"] uses: ./.github/workflows/e2e.yaml with: diff --git a/.github/workflows/weekly.yaml b/.github/workflows/weekly.yaml new file mode 100644 index 000000000..b9724ff21 --- /dev/null +++ b/.github/workflows/weekly.yaml @@ -0,0 +1,68 @@ +name: Weekly E2E + +on: + schedule: + # 11:00 (JST) + - cron: '0 2 * * 1' + +env: + cache-version: 1 + +# Weekly E2E tests using all MySQL versions supported by MOCO +jobs: + dbtest: + name: Integration tests with MySQL + strategy: + matrix: + mysql-version: ["8.0.18", "8.0.25", "8.0.26", "8.0.27", "8.0.28", "8.0.30"] + uses: ./.github/workflows/dbtest.yaml + with: + mysql-version: ${{ matrix.mysql-version }} + + e2e: + name: Supported Kubernetes versions End-to-End Tests + strategy: + matrix: + mysql-version: ["8.0.30"] + k8s-version: ["1.22.9", "1.23.6", "1.24.2"] + uses: ./.github/workflows/e2e.yaml + with: + k8s-version: ${{ matrix.k8s-version }} + mysql-version: ${{ matrix.mysql-version }} + + e2e-mysql: + name: Supported MySQL versions End-to-End Tests + strategy: + matrix: + mysql-version: ["8.0.18", "8.0.25", "8.0.26", "8.0.27", "8.0.28", "8.0.30"] + k8s-version: ["1.24.2"] + uses: ./.github/workflows/e2e.yaml + with: + k8s-version: ${{ matrix.k8s-version }} + mysql-version: ${{ matrix.mysql-version }} + + upgrade: + name: Upgrade Test + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-go@v3 + with: + go-version-file: go.mod + - run: | + swapon > swapon.txt + sudo swapoff -a + cat swapon.txt | tail -n+2 | awk '$2=="file" {print $1}' | sudo xargs --no-run-if-empty rm + - run: sudo mkdir /mnt/local-path-provisioner0 /mnt/local-path-provisioner1 /mnt/local-path-provisioner2 + - run: make start KIND_CONFIG=kind-config_actions.yaml + working-directory: e2e + - run: make test-upgrade + working-directory: e2e + - run: make logs + working-directory: e2e + if: always() + - uses: actions/upload-artifact@v3 + if: always() + with: + name: logs-upgrade.tar.gz + path: e2e/logs.tar.gz