mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
feat: Introduce go-version file to support multiple go versions on CI (#25271)
This commit is contained in:
parent
b2abd533a1
commit
fc87054f14
11
.github/workflows/mmctl-test-template.yml
vendored
11
.github/workflows/mmctl-test-template.yml
vendored
@ -14,8 +14,7 @@ on:
|
||||
logsartifact:
|
||||
required: true
|
||||
type: string
|
||||
env:
|
||||
go-version: "1.20.7"
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: ${{ inputs.name }}
|
||||
@ -26,16 +25,20 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout mattermost project
|
||||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
||||
- name: Calculate Golang Version
|
||||
id: go
|
||||
working-directory: ./server
|
||||
run: echo GO_VERSION=$(cat .go-version) >> "${GITHUB_OUTPUT}"
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
|
||||
with:
|
||||
go-version: ${{ env.go-version }}
|
||||
go-version: ${{ steps.go.outputs.GO_VERSION }}
|
||||
cache-dependency-path: server/go.sum
|
||||
- name: Run setup-go-work
|
||||
run: |
|
||||
cd server
|
||||
make setup-go-work
|
||||
- name: Setup needed prepackaged plugins
|
||||
- name: Setup needed prepackaged plugins
|
||||
run: |
|
||||
cd server
|
||||
make prepackaged-plugins PLUGIN_PACKAGES=mattermost-plugin-jira-v3.2.5
|
||||
|
2
.github/workflows/server-ci-master.yml
vendored
2
.github/workflows/server-ci-master.yml
vendored
@ -6,8 +6,6 @@ on:
|
||||
- cloud
|
||||
- release-*
|
||||
- mono-repo*
|
||||
env:
|
||||
go-version: "1.20.7"
|
||||
|
||||
jobs:
|
||||
master-ci:
|
||||
|
3
.github/workflows/server-ci-pr.yml
vendored
3
.github/workflows/server-ci-pr.yml
vendored
@ -5,8 +5,7 @@ on:
|
||||
- "server/**"
|
||||
- "e2e-tests/**"
|
||||
- ".github/**"
|
||||
env:
|
||||
go-version: "1.20.7"
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
55
.github/workflows/server-ci-template.yml
vendored
55
.github/workflows/server-ci-template.yml
vendored
@ -5,9 +5,6 @@ name: Server CI Template
|
||||
on:
|
||||
workflow_call:
|
||||
|
||||
env:
|
||||
go-version: "1.20.7"
|
||||
|
||||
jobs:
|
||||
check-mocks:
|
||||
name: Check mocks
|
||||
@ -18,10 +15,13 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout mattermost project
|
||||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
||||
- name: Calculate Golang Version
|
||||
id: go
|
||||
run: echo GO_VERSION=$(cat .go-version) >> "${GITHUB_OUTPUT}"
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
|
||||
with:
|
||||
go-version: ${{ env.go-version }}
|
||||
go-version: ${{ steps.go.outputs.GO_VERSION }}
|
||||
cache-dependency-path: |
|
||||
server/go.sum
|
||||
server/public/go.sum
|
||||
@ -40,10 +40,13 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout mattermost project
|
||||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
||||
- name: Calculate Golang Version
|
||||
id: go
|
||||
run: echo GO_VERSION=$(cat .go-version) >> "${GITHUB_OUTPUT}"
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
|
||||
with:
|
||||
go-version: ${{ env.go-version }}
|
||||
go-version: ${{ steps.go.outputs.GO_VERSION }}
|
||||
cache-dependency-path: |
|
||||
server/go.sum
|
||||
server/public/go.sum
|
||||
@ -62,10 +65,13 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout mattermost project
|
||||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
||||
- name: Calculate Golang Version
|
||||
id: go
|
||||
run: echo GO_VERSION=$(cat .go-version) >> "${GITHUB_OUTPUT}"
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
|
||||
with:
|
||||
go-version: ${{ env.go-version }}
|
||||
go-version: ${{ steps.go.outputs.GO_VERSION }}
|
||||
cache-dependency-path: |
|
||||
server/go.sum
|
||||
server/public/go.sum
|
||||
@ -82,10 +88,13 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout mattermost project
|
||||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
||||
- name: Calculate Golang Version
|
||||
id: go
|
||||
run: echo GO_VERSION=$(cat .go-version) >> "${GITHUB_OUTPUT}"
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
|
||||
with:
|
||||
go-version: ${{ env.go-version }}
|
||||
go-version: ${{ steps.go.outputs.GO_VERSION }}
|
||||
cache-dependency-path: |
|
||||
server/go.sum
|
||||
server/public/go.sum
|
||||
@ -104,10 +113,13 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout mattermost project
|
||||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
||||
- name: Calculate Golang Version
|
||||
id: go
|
||||
run: echo GO_VERSION=$(cat .go-version) >> "${GITHUB_OUTPUT}"
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
|
||||
with:
|
||||
go-version: ${{ env.go-version }}
|
||||
go-version: ${{ steps.go.outputs.GO_VERSION }}
|
||||
cache-dependency-path: |
|
||||
server/go.sum
|
||||
server/public/go.sum
|
||||
@ -128,10 +140,13 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout mattermost project
|
||||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
||||
- name: Calculate Golang Version
|
||||
id: go
|
||||
run: echo GO_VERSION=$(cat .go-version) >> "${GITHUB_OUTPUT}"
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
|
||||
with:
|
||||
go-version: ${{ env.go-version }}
|
||||
go-version: ${{ steps.go.outputs.GO_VERSION }}
|
||||
cache-dependency-path: |
|
||||
server/go.sum
|
||||
server/public/go.sum
|
||||
@ -176,10 +191,13 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout mattermost project
|
||||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
||||
- name: Calculate Golang Version
|
||||
id: go
|
||||
run: echo GO_VERSION=$(cat .go-version) >> "${GITHUB_OUTPUT}"
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
|
||||
with:
|
||||
go-version: ${{ env.go-version }}
|
||||
go-version: ${{ steps.go.outputs.GO_VERSION }}
|
||||
cache-dependency-path: |
|
||||
server/go.sum
|
||||
server/public/go.sum
|
||||
@ -198,10 +216,13 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout mattermost project
|
||||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
||||
- name: Calculate Golang Version
|
||||
id: go
|
||||
run: echo GO_VERSION=$(cat .go-version) >> "${GITHUB_OUTPUT}"
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
|
||||
with:
|
||||
go-version: ${{ env.go-version }}
|
||||
go-version: ${{ steps.go.outputs.GO_VERSION }}
|
||||
cache-dependency-path: |
|
||||
server/go.sum
|
||||
server/public/go.sum
|
||||
@ -220,10 +241,13 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout mattermost-server
|
||||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
||||
- name: Calculate Golang Version
|
||||
id: go
|
||||
run: echo GO_VERSION=$(cat .go-version) >> "${GITHUB_OUTPUT}"
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
|
||||
with:
|
||||
go-version: ${{ env.go-version }}
|
||||
go-version: ${{ steps.go.outputs.GO_VERSION }}
|
||||
cache-dependency-path: |
|
||||
server/go.sum
|
||||
server/public/go.sum
|
||||
@ -284,10 +308,13 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout mattermost project
|
||||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
||||
- name: Calculate Golang Version
|
||||
id: go
|
||||
run: echo GO_VERSION=$(cat .go-version) >> "${GITHUB_OUTPUT}"
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
|
||||
with:
|
||||
go-version: ${{ env.go-version }}
|
||||
go-version: ${{ steps.go.outputs.GO_VERSION }}
|
||||
cache-dependency-path: |
|
||||
server/go.sum
|
||||
server/public/go.sum
|
||||
@ -297,7 +324,7 @@ jobs:
|
||||
with:
|
||||
node-version-file: ".nvmrc"
|
||||
cache: npm
|
||||
cache-dependency-path: 'webapp/package-lock.json'
|
||||
cache-dependency-path: "webapp/package-lock.json"
|
||||
- name: Run setup-go-work
|
||||
run: make setup-go-work
|
||||
- name: Build
|
||||
|
9
.github/workflows/server-test-template.yml
vendored
9
.github/workflows/server-test-template.yml
vendored
@ -14,8 +14,7 @@ on:
|
||||
logsartifact:
|
||||
required: true
|
||||
type: string
|
||||
env:
|
||||
go-version: "1.20.7"
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: ${{ inputs.name }}
|
||||
@ -26,10 +25,14 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout mattermost project
|
||||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
||||
- name: Calculate Golang Version
|
||||
id: go
|
||||
working-directory: ./server
|
||||
run: echo GO_VERSION=$(cat .go-version) >> "${GITHUB_OUTPUT}"
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
|
||||
with:
|
||||
go-version: ${{ env.go-version }}
|
||||
go-version: ${{ steps.go.outputs.GO_VERSION }}
|
||||
cache-dependency-path: server/go.sum
|
||||
- name: Run docker compose
|
||||
run: |
|
||||
|
1
server/.go-version
Normal file
1
server/.go-version
Normal file
@ -0,0 +1 @@
|
||||
1.20.7
|
Loading…
Reference in New Issue
Block a user