From 4ff375186acffea8b7891ebb23e83ba8a09f70bd Mon Sep 17 00:00:00 2001 From: Kazumichi Yamamoto Date: Wed, 22 Nov 2023 11:41:18 +0900 Subject: [PATCH] Improve CI (#183) --- .github/workflows/daily.yaml | 33 +++++++++++++++++++++++++++++++++ .github/workflows/release.yaml | 2 +- .github/workflows/tests.yaml | 11 ++++------- 3 files changed, 38 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/daily.yaml diff --git a/.github/workflows/daily.yaml b/.github/workflows/daily.yaml new file mode 100644 index 00000000..c67c9d0f --- /dev/null +++ b/.github/workflows/daily.yaml @@ -0,0 +1,33 @@ +name: Daily Integration Test +on: + schedule: + - cron: '30 23 * * *' + workflow_dispatch: +env: + GOPROXY: https://proxy.golang.org +jobs: + test: + name: test + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [macos-latest, windows-latest, ubuntu-22.04, ubuntu-20.04] + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Unshallow + run: git fetch --prune --unshallow + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version-file: 'go.mod' + + - name: Setup tools + run: | + make tools + + - name: make test + run: | + make test diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 0966f989..6dbb63d4 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -20,7 +20,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: "1.21" + go-version-file: 'go.mod' - name: Describe plugin id: plugin_describe diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 327b77c7..5bb7f10f 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -16,7 +16,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: "1.21" + go-version-file: 'go.mod' - name: Setup tools run: | @@ -38,7 +38,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: "1.21" + go-version-file: 'go.mod' - name: Setup tools run: | @@ -53,10 +53,7 @@ jobs: test: name: test - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [macos-latest, windows-latest, ubuntu-22.04, ubuntu-20.04] + runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 @@ -67,7 +64,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: "1.21" + go-version-file: 'go.mod' - name: Setup tools run: |