Bumps the github-actions-updates group with 5 updates: | Package | From | To | | --- | --- | --- | | [actions/upload-artifact](https://github.com/actions/upload-artifact) | `4.4.3` | `4.6.2` | | [github/codeql-action](https://github.com/github/codeql-action) | `3.28.11` | `3.28.12` | | [actions/download-artifact](https://github.com/actions/download-artifact) | `4.1.8` | `4.2.1` | | [tj-actions/changed-files](https://github.com/tj-actions/changed-files) | `531f5f7d163941f0c1c04e0ff4d8bb243ac4366f` | `27ae6b33eaed7bf87272fdeb9f1c54f9facc9d99` | | [getsentry/action-release](https://github.com/getsentry/action-release) | `3.1.0` | `3.1.1` | Updates `actions/upload-artifact` from 4.4.3 to 4.6.2 - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v4.4.3...ea165f8d65b6e75b540449e92b4886f43607fa02) Updates `github/codeql-action` from 3.28.11 to 3.28.12 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/v3.28.11...5f8171a638ada777af81d42b55959a643bb29017) Updates `actions/download-artifact` from 4.1.8 to 4.2.1 - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](https://github.com/actions/download-artifact/compare/v4.1.8...95815c38cf2ff2164869cbab79da8d1f422bc89e) Updates `tj-actions/changed-files` from 531f5f7d163941f0c1c04e0ff4d8bb243ac4366f to 27ae6b33eaed7bf87272fdeb9f1c54f9facc9d99 - [Release notes](https://github.com/tj-actions/changed-files/releases) - [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md) - [Commits](531f5f7d16...27ae6b33ea) Updates `getsentry/action-release` from 3.1.0 to 3.1.1 - [Release notes](https://github.com/getsentry/action-release/releases) - [Changelog](https://github.com/getsentry/action-release/blob/master/CHANGELOG.md) - [Commits](fa247637f7...00ed2a6cc2) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions-updates - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions-updates - dependency-name: actions/download-artifact dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions-updates - dependency-name: tj-actions/changed-files dependency-type: direct:production dependency-group: github-actions-updates - dependency-name: getsentry/action-release dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions-updates ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
329 строки
12 KiB
YAML
329 строки
12 KiB
YAML
# Base CI template which is called from server-ci-pr.yml
|
|
# and server-ci-master.yml
|
|
|
|
name: Server CI Template
|
|
on:
|
|
workflow_call:
|
|
|
|
jobs:
|
|
check-mocks:
|
|
name: Check mocks
|
|
runs-on: ubuntu-22.04
|
|
defaults:
|
|
run:
|
|
working-directory: server
|
|
steps:
|
|
- name: Checkout mattermost project
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
- name: Calculate Golang Version
|
|
id: go
|
|
run: echo GO_VERSION=$(cat .go-version) >> "${GITHUB_OUTPUT}"
|
|
- name: Setup Go
|
|
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
|
|
with:
|
|
go-version: ${{ steps.go.outputs.GO_VERSION }}
|
|
cache-dependency-path: |
|
|
server/go.sum
|
|
server/public/go.sum
|
|
- name: Run setup-go-work
|
|
run: make setup-go-work
|
|
- name: Generate mocks
|
|
run: make mocks
|
|
- name: Check mocks
|
|
run: if [[ -n $(git status --porcelain) ]]; then echo "Please update the mocks using `make mocks`"; exit 1; fi
|
|
check-go-mod-tidy:
|
|
name: Check go mod tidy
|
|
runs-on: ubuntu-22.04
|
|
defaults:
|
|
run:
|
|
working-directory: server
|
|
steps:
|
|
- name: Checkout mattermost project
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
- name: Calculate Golang Version
|
|
id: go
|
|
run: echo GO_VERSION=$(cat .go-version) >> "${GITHUB_OUTPUT}"
|
|
- name: Setup Go
|
|
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
|
|
with:
|
|
go-version: ${{ steps.go.outputs.GO_VERSION }}
|
|
cache-dependency-path: |
|
|
server/go.sum
|
|
server/public/go.sum
|
|
- name: Run setup-go-work
|
|
run: make setup-go-work
|
|
- name: Run go mod tidy
|
|
run: make modules-tidy
|
|
- name: Check modules
|
|
run: if [[ -n $(git status --porcelain) ]]; then echo "Please tidy up the Go modules using make modules-tidy"; git diff; exit 1; fi
|
|
golangci:
|
|
name: golangci-lint
|
|
runs-on: ubuntu-22.04
|
|
defaults:
|
|
run:
|
|
working-directory: server
|
|
steps:
|
|
- name: Checkout mattermost project
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
- name: Calculate Golang Version
|
|
id: go
|
|
run: echo GO_VERSION=$(cat .go-version) >> "${GITHUB_OUTPUT}"
|
|
- name: Setup Go
|
|
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
|
|
with:
|
|
go-version: ${{ steps.go.outputs.GO_VERSION }}
|
|
cache-dependency-path: |
|
|
server/go.sum
|
|
server/public/go.sum
|
|
- name: Run setup-go-work
|
|
run: make setup-go-work
|
|
- name: Run golangci
|
|
run: make golangci-lint
|
|
check-gen-serialized:
|
|
name: Check serialization methods for hot structs
|
|
runs-on: ubuntu-22.04
|
|
defaults:
|
|
run:
|
|
working-directory: server
|
|
steps:
|
|
- name: Checkout mattermost project
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
- name: Calculate Golang Version
|
|
id: go
|
|
run: echo GO_VERSION=$(cat .go-version) >> "${GITHUB_OUTPUT}"
|
|
- name: Setup Go
|
|
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
|
|
with:
|
|
go-version: ${{ steps.go.outputs.GO_VERSION }}
|
|
cache-dependency-path: |
|
|
server/go.sum
|
|
server/public/go.sum
|
|
- name: Run setup-go-work
|
|
run: make setup-go-work
|
|
- name: Run make-gen-serialized
|
|
run: make gen-serialized
|
|
- name: Check serialized
|
|
run: if [[ -n $(git status --porcelain) ]]; then echo "Please update the serialized files using 'make gen-serialized'"; exit 1; fi
|
|
check-mattermost-vet:
|
|
name: Check style
|
|
runs-on: ubuntu-22.04
|
|
defaults:
|
|
run:
|
|
working-directory: server
|
|
steps:
|
|
- name: Checkout mattermost project
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
- name: Calculate Golang Version
|
|
id: go
|
|
run: echo GO_VERSION=$(cat .go-version) >> "${GITHUB_OUTPUT}"
|
|
- name: Setup Go
|
|
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
|
|
with:
|
|
go-version: ${{ steps.go.outputs.GO_VERSION }}
|
|
cache-dependency-path: |
|
|
server/go.sum
|
|
server/public/go.sum
|
|
- name: Run setup-go-work
|
|
run: make setup-go-work
|
|
- name: Reset config
|
|
run: make config-reset
|
|
- name: Run plugin-checker
|
|
run: make plugin-checker
|
|
- name: Run mattermost-vet
|
|
run: make vet BUILD_NUMBER='${GITHUB_HEAD_REF}' MM_NO_ENTERPRISE_LINT=true
|
|
check-mattermost-vet-api:
|
|
name: Vet API
|
|
runs-on: ubuntu-22.04
|
|
defaults:
|
|
run:
|
|
working-directory: server
|
|
steps:
|
|
- name: Checkout mattermost project
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
- name: Calculate Golang Version
|
|
id: go
|
|
run: echo GO_VERSION=$(cat .go-version) >> "${GITHUB_OUTPUT}"
|
|
- name: Setup Go
|
|
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
|
|
with:
|
|
go-version: ${{ steps.go.outputs.GO_VERSION }}
|
|
cache-dependency-path: |
|
|
server/go.sum
|
|
server/public/go.sum
|
|
- name: Run setup-go-work
|
|
run: make setup-go-work
|
|
- name: Run mattermost-vet-api
|
|
run: make vet-api
|
|
check-migrations:
|
|
name: Check migration files
|
|
runs-on: ubuntu-22.04
|
|
defaults:
|
|
run:
|
|
working-directory: server
|
|
steps:
|
|
- name: Checkout mattermost project
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
- name: Extract migrations files
|
|
run: make migrations-extract
|
|
- name: Check migration files
|
|
run: if [[ -n $(git status --porcelain) ]]; then echo "Please update the migrations using make migrations-extract"; exit 1; fi
|
|
check-email-templates:
|
|
name: Generate email templates
|
|
runs-on: ubuntu-22.04
|
|
defaults:
|
|
run:
|
|
working-directory: server
|
|
steps:
|
|
- name: Checkout mattermost project
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
- name: Generate email templates
|
|
run: |
|
|
sudo npm install -g mjml@4.9.0
|
|
make build-templates
|
|
- name: Check generated email templates
|
|
run: if [[ -n $(git status --porcelain) ]]; then echo "Please update the email templates using `make build-templates`"; exit 1; fi
|
|
check-store-layers:
|
|
name: Check store layers
|
|
runs-on: ubuntu-22.04
|
|
defaults:
|
|
run:
|
|
working-directory: server
|
|
steps:
|
|
- name: Checkout mattermost project
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
- name: Calculate Golang Version
|
|
id: go
|
|
run: echo GO_VERSION=$(cat .go-version) >> "${GITHUB_OUTPUT}"
|
|
- name: Setup Go
|
|
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
|
|
with:
|
|
go-version: ${{ steps.go.outputs.GO_VERSION }}
|
|
cache-dependency-path: |
|
|
server/go.sum
|
|
server/public/go.sum
|
|
- name: Run setup-go-work
|
|
run: make setup-go-work
|
|
- name: Generate store layers
|
|
run: make store-layers
|
|
- name: Check generated code
|
|
run: if [[ -n $(git status --porcelain) ]]; then echo "Please update the store layers using make store-layers"; exit 1; fi
|
|
check-mmctl-docs:
|
|
name: Check mmctl docs
|
|
runs-on: ubuntu-22.04
|
|
defaults:
|
|
run:
|
|
working-directory: server
|
|
steps:
|
|
- name: Checkout mattermost-server
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
- name: Calculate Golang Version
|
|
id: go
|
|
run: echo GO_VERSION=$(cat .go-version) >> "${GITHUB_OUTPUT}"
|
|
- name: Setup Go
|
|
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
|
|
with:
|
|
go-version: ${{ steps.go.outputs.GO_VERSION }}
|
|
cache-dependency-path: |
|
|
server/go.sum
|
|
server/public/go.sum
|
|
- name: Run setup-go-work
|
|
run: make setup-go-work
|
|
- name: Check docs
|
|
run: |
|
|
echo "Making sure docs are updated"
|
|
make mmctl-docs
|
|
if [[ -n $(git status --porcelain) ]]; then echo "Please update the mmctl docs using make mmctl-docs"; exit 1; fi
|
|
test-postgres-binary:
|
|
if: github.ref_name != 'master' # Do not run postgres binary tests on master
|
|
name: Postgres with binary parameters
|
|
needs: check-mattermost-vet
|
|
uses: ./.github/workflows/server-test-template.yml
|
|
secrets: inherit
|
|
with:
|
|
name: Postgres with binary parameters
|
|
datasource: postgres://mmuser:mostest@postgres:5432/mattermost_test?sslmode=disable&connect_timeout=10&binary_parameters=yes
|
|
drivername: postgres
|
|
logsartifact: postgres-binary-server-test-logs
|
|
test-postgres-normal:
|
|
name: Postgres
|
|
needs: check-mattermost-vet
|
|
uses: ./.github/workflows/server-test-template.yml
|
|
secrets: inherit
|
|
with:
|
|
name: Postgres
|
|
datasource: postgres://mmuser:mostest@postgres:5432/mattermost_test?sslmode=disable&connect_timeout=10
|
|
drivername: postgres
|
|
logsartifact: postgres-server-test-logs
|
|
test-mysql:
|
|
name: MySQL
|
|
needs: check-mattermost-vet
|
|
uses: ./.github/workflows/server-test-template.yml
|
|
secrets: inherit
|
|
with:
|
|
name: MySQL
|
|
datasource: mmuser:mostest@tcp(mysql:3306)/mattermost_test?charset=utf8mb4&multiStatements=true&maxAllowedPacket=4194304
|
|
drivername: mysql
|
|
logsartifact: mysql-server-test-logs
|
|
test-mmctl:
|
|
name: Run mmctl tests
|
|
needs: check-mattermost-vet
|
|
uses: ./.github/workflows/mmctl-test-template.yml
|
|
secrets: inherit
|
|
with:
|
|
name: mmctl
|
|
datasource: postgres://mmuser:mostest@postgres:5432/mattermost_test?sslmode=disable&connect_timeout=10
|
|
drivername: postgres
|
|
logsartifact: mmctl-test-logs
|
|
build-mattermost-server:
|
|
name: Build mattermost server app
|
|
runs-on: ubuntu-22.04
|
|
defaults:
|
|
run:
|
|
working-directory: server
|
|
needs: check-mattermost-vet
|
|
steps:
|
|
- name: Checkout mattermost project
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
- name: Calculate Golang Version
|
|
id: go
|
|
run: echo GO_VERSION=$(cat .go-version) >> "${GITHUB_OUTPUT}"
|
|
- name: Setup Go
|
|
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
|
|
with:
|
|
go-version: ${{ steps.go.outputs.GO_VERSION }}
|
|
cache-dependency-path: |
|
|
server/go.sum
|
|
server/public/go.sum
|
|
- name: ci/setup-node
|
|
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
|
|
id: setup_node
|
|
with:
|
|
node-version-file: ".nvmrc"
|
|
cache: npm
|
|
cache-dependency-path: "webapp/package-lock.json"
|
|
- name: Run setup-go-work
|
|
run: make setup-go-work
|
|
- name: Build
|
|
run: |
|
|
make config-reset
|
|
make build-cmd BUILD_NUMBER='${GITHUB_HEAD_REF}-${GITHUB_RUN_ID}'
|
|
make package BUILD_NUMBER='${GITHUB_HEAD_REF}-${GITHUB_RUN_ID}'
|
|
- name: Persist dist artifacts
|
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
|
with:
|
|
name: server-dist-artifact
|
|
path: server/dist/
|
|
if-no-files-found: error
|
|
compression-level: 0
|
|
retention-days: 2
|
|
- name: Persist build artifacts
|
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
|
with:
|
|
name: server-build-artifact
|
|
path: server/build/
|
|
retention-days: 2
|
|
test-migration:
|
|
name: MySQL to PostgreSQL Migration
|
|
uses: ./.github/workflows/migration.yml
|
|
secrets: inherit
|