mirror of
https://github.com/mattermost/mattermost.git
synced 2026-05-28 04:35:04 -04:00
Bumps the github-actions-updates group with 19 updates in the / directory: | Package | From | To | | --- | --- | --- | | [actions/checkout](https://github.com/actions/checkout) | `4.2.2` | `6.0.2` | | [actions/setup-node](https://github.com/actions/setup-node) | `6.3.0` | `6.4.0` | | [docker/login-action](https://github.com/docker/login-action) | `4.0.0` | `4.2.0` | | [docker/build-push-action](https://github.com/docker/build-push-action) | `7.0.0` | `7.2.0` | | [chainguard-dev/setup-chainctl](https://github.com/chainguard-dev/setup-chainctl) | `0.5.0` | `0.5.1` | | [anthropics/claude-code-action](https://github.com/anthropics/claude-code-action) | `1.0.70` | `1.0.133` | | [github/codeql-action](https://github.com/github/codeql-action) | `4.32.6` | `4.36.0` | | [actions/setup-go](https://github.com/actions/setup-go) | `6.3.0` | `6.4.0` | | [actions/github-script](https://github.com/actions/github-script) | `7.0.1` | `9.0.0` | | [actions/upload-artifact](https://github.com/actions/upload-artifact) | `7.0.0` | `7.0.1` | | [actions/download-artifact](https://github.com/actions/download-artifact) | `8.0.0` | `8.0.1` | | [aws-actions/configure-aws-credentials](https://github.com/aws-actions/configure-aws-credentials) | `6.0.0` | `6.1.1` | | [actions/cache](https://github.com/actions/cache) | `4.2.3` | `5.0.5` | | [tj-actions/changed-files](https://github.com/tj-actions/changed-files) | `47.0.5` | `47.0.6` | | [getsentry/action-release](https://github.com/getsentry/action-release) | `3.5.0` | `3.6.0` | | [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) | `4.0.0` | `4.1.2` | | [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) | `4.0.0` | `4.1.0` | | [mikepenz/action-junit-report](https://github.com/mikepenz/action-junit-report) | `6.3.1` | `6.4.1` | | [codecov/codecov-action](https://github.com/codecov/codecov-action) | `5.5.2` | `6.0.1` | Updates `actions/checkout` from 4.2.2 to 6.0.2 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4.2.2...de0fac2e4500dabe0009e67214ff5f5447ce83dd) Updates `actions/setup-node` from 6.3.0 to 6.4.0 - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](53b83947a5...48b55a011b) Updates `docker/login-action` from 4.0.0 to 4.2.0 - [Release notes](https://github.com/docker/login-action/releases) - [Commits](b45d80f862...650006c6eb) Updates `docker/build-push-action` from 7.0.0 to 7.2.0 - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](d08e5c354a...f9f3042f7e) Updates `chainguard-dev/setup-chainctl` from 0.5.0 to 0.5.1 - [Release notes](https://github.com/chainguard-dev/setup-chainctl/releases) - [Commits](c125f765e8...2cddd35a2f) Updates `anthropics/claude-code-action` from 1.0.70 to 1.0.133 - [Release notes](https://github.com/anthropics/claude-code-action/releases) - [Commits](26ec041249...787c5a0ce9) Updates `github/codeql-action` from 4.32.6 to 4.36.0 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](0d579ffd05...7211b7c807) Updates `actions/setup-go` from 6.3.0 to 6.4.0 - [Release notes](https://github.com/actions/setup-go/releases) - [Commits](4b73464bb3...4a3601121d) Updates `actions/github-script` from 7.0.1 to 9.0.0 - [Release notes](https://github.com/actions/github-script/releases) - [Commits](https://github.com/actions/github-script/compare/v7.0.1...3a2844b7e9c422d3c10d287c895573f7108da1b3) Updates `actions/upload-artifact` from 7.0.0 to 7.0.1 - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](bbbca2ddaa...043fb46d1a) Updates `actions/download-artifact` from 8.0.0 to 8.0.1 - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](70fc10c6e5...3e5f45b2cf) Updates `aws-actions/configure-aws-credentials` from 6.0.0 to 6.1.1 - [Release notes](https://github.com/aws-actions/configure-aws-credentials/releases) - [Changelog](https://github.com/aws-actions/configure-aws-credentials/blob/main/CHANGELOG.md) - [Commits](8df5847569...d979d5b3a7) Updates `actions/cache` from 4.2.3 to 5.0.5 - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/v4.2.3...27d5ce7f107fe9357f9df03efb73ab90386fccae) Updates `tj-actions/changed-files` from 47.0.5 to 47.0.6 - [Release notes](https://github.com/tj-actions/changed-files/releases) - [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md) - [Commits](22103cc46b...9426d40962) Updates `getsentry/action-release` from 3.5.0 to 3.6.0 - [Release notes](https://github.com/getsentry/action-release/releases) - [Changelog](https://github.com/getsentry/action-release/blob/master/CHANGELOG.md) - [Commits](dab6548b3c...5657c9e888) Updates `sigstore/cosign-installer` from 4.0.0 to 4.1.2 - [Release notes](https://github.com/sigstore/cosign-installer/releases) - [Commits](faadad0cce...6f9f177880) Updates `docker/setup-buildx-action` from 4.0.0 to 4.1.0 - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](4d04d5d948...d7f5e7f509) Updates `mikepenz/action-junit-report` from 6.3.1 to 6.4.1 - [Release notes](https://github.com/mikepenz/action-junit-report/releases) - [Commits](49b2ca06f6...3a81627bfa) Updates `codecov/codecov-action` from 5.5.2 to 6.0.1 - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](671740ac38...e79a6962e0) --- updated-dependencies: - dependency-name: actions/cache dependency-version: 5.0.5 dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions-updates - dependency-name: actions/checkout dependency-version: 6.0.2 dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions-updates - dependency-name: actions/download-artifact dependency-version: 8.0.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions-updates - dependency-name: actions/github-script dependency-version: 9.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions-updates - dependency-name: actions/setup-go dependency-version: 6.4.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions-updates - dependency-name: actions/setup-node dependency-version: 6.4.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions-updates - dependency-name: actions/upload-artifact dependency-version: 7.0.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions-updates - dependency-name: anthropics/claude-code-action dependency-version: 1.0.133 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions-updates - dependency-name: aws-actions/configure-aws-credentials dependency-version: 6.1.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions-updates - dependency-name: chainguard-dev/setup-chainctl dependency-version: 0.5.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions-updates - dependency-name: codecov/codecov-action dependency-version: 6.0.1 dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions-updates - dependency-name: docker/build-push-action dependency-version: 7.2.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions-updates - dependency-name: docker/login-action dependency-version: 4.2.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions-updates - dependency-name: docker/setup-buildx-action dependency-version: 4.1.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions-updates - dependency-name: getsentry/action-release dependency-version: 3.6.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions-updates - dependency-name: github/codeql-action dependency-version: 4.36.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions-updates - dependency-name: mikepenz/action-junit-report dependency-version: 6.4.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions-updates - dependency-name: sigstore/cosign-installer dependency-version: 4.1.2 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions-updates - dependency-name: tj-actions/changed-files dependency-version: 47.0.6 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions-updates ... Signed-off-by: dependabot[bot] <support@github.com>
412 lines
15 KiB
YAML
412 lines
15 KiB
YAML
# NOTE: This workflow name is referenced by other workflows:
|
|
# - server-ci-artifacts.yml
|
|
# - server-ci-report.yml
|
|
# - sentry.yaml
|
|
# If you rename this workflow, be sure to update those workflows as well.
|
|
name: Server CI
|
|
on:
|
|
workflow_dispatch: # Allow manual/API triggering for linked plugin CI
|
|
push:
|
|
branches:
|
|
- master
|
|
- release-*
|
|
pull_request:
|
|
paths:
|
|
- "server/**"
|
|
- ".github/workflows/server-ci.yml"
|
|
- ".github/workflows/server-test-template.yml"
|
|
- ".github/workflows/server-test-merge-template.yml"
|
|
- ".github/workflows/mmctl-test-template.yml"
|
|
- "!server/build/Dockerfile.buildenv"
|
|
- "!server/build/Dockerfile.buildenv-fips"
|
|
- "tools/mattermost-govet/**"
|
|
- "!server/**/*.md"
|
|
- "!server/NOTICE.txt"
|
|
- "!server/CHANGELOG.md"
|
|
|
|
concurrency:
|
|
group: ${{ github.event_name == 'pull_request' && format('{0}-{1}', github.workflow, github.ref) || github.run_id }}
|
|
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
|
|
jobs:
|
|
go:
|
|
name: Compute Go Version
|
|
runs-on: ubuntu-22.04
|
|
outputs:
|
|
version: ${{ steps.calculate.outputs.GO_VERSION }}
|
|
gomod-changed: ${{ steps.changed-files.outputs.any_changed }}
|
|
steps:
|
|
- name: Checkout mattermost project
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
- name: Calculate version
|
|
id: calculate
|
|
working-directory: server/
|
|
run: echo GO_VERSION=$(cat .go-version) >> "${GITHUB_OUTPUT}"
|
|
- name: Check for go.mod changes
|
|
id: changed-files
|
|
uses: tj-actions/changed-files@9426d40962ed5378910ee2e21d5f8c6fcbf2dd96 # v47.0.6
|
|
with:
|
|
files: |
|
|
**/go.mod
|
|
check-mocks:
|
|
name: Check mocks
|
|
needs: go
|
|
runs-on: ubuntu-22.04
|
|
container: mattermost/mattermost-build-server:${{ needs.go.outputs.version }}
|
|
defaults:
|
|
run:
|
|
working-directory: server
|
|
steps:
|
|
- name: Checkout mattermost project
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
- 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
|
|
needs: go
|
|
runs-on: ubuntu-22.04
|
|
container: mattermost/mattermost-build-server:${{ needs.go.outputs.version }}
|
|
defaults:
|
|
run:
|
|
working-directory: server
|
|
steps:
|
|
- name: Checkout mattermost project
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
- 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
|
|
check-go-fix:
|
|
name: Check go fix
|
|
needs: go
|
|
runs-on: ubuntu-22.04
|
|
container: mattermost/mattermost-build-server:${{ needs.go.outputs.version }}
|
|
defaults:
|
|
run:
|
|
working-directory: server
|
|
steps:
|
|
- name: Checkout mattermost project
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
- name: Run setup-go-work
|
|
run: make setup-go-work
|
|
- name: Run go fix
|
|
run: go fix ./...
|
|
- name: Check go fix
|
|
run: if [[ -n $(git status --porcelain) ]]; then echo "Please run 'go fix ./...' and commit the changes"; git diff; exit 1; fi
|
|
check-style:
|
|
name: check-style
|
|
needs: go
|
|
runs-on: ubuntu-22.04
|
|
container: mattermost/mattermost-build-server:${{ needs.go.outputs.version }}
|
|
defaults:
|
|
run:
|
|
working-directory: server
|
|
steps:
|
|
- name: Checkout mattermost project
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
- name: Run setup-go-work
|
|
run: make setup-go-work
|
|
- name: Run golangci
|
|
run: make check-style
|
|
check-gen-serialized:
|
|
name: Check serialization methods for hot structs
|
|
needs: go
|
|
runs-on: ubuntu-22.04
|
|
container: mattermost/mattermost-build-server:${{ needs.go.outputs.version }}
|
|
defaults:
|
|
run:
|
|
working-directory: server
|
|
steps:
|
|
- name: Checkout mattermost project
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
- 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-api:
|
|
name: Vet API
|
|
needs: go
|
|
runs-on: ubuntu-22.04
|
|
container: mattermost/mattermost-build-server:${{ needs.go.outputs.version }}
|
|
defaults:
|
|
run:
|
|
working-directory: server
|
|
steps:
|
|
- name: Checkout mattermost project
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
- 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
|
|
needs: go
|
|
runs-on: ubuntu-22.04
|
|
container: mattermost/mattermost-build-server:${{ needs.go.outputs.version }}
|
|
defaults:
|
|
run:
|
|
working-directory: server
|
|
steps:
|
|
- name: Checkout mattermost project
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.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
|
|
needs: go
|
|
runs-on: ubuntu-22.04
|
|
container: mattermost/mattermost-build-server:${{ needs.go.outputs.version }}
|
|
defaults:
|
|
run:
|
|
working-directory: server
|
|
steps:
|
|
- name: Checkout mattermost project
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
- name: Generate email templates
|
|
run: |
|
|
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
|
|
needs: go
|
|
runs-on: ubuntu-22.04
|
|
container: mattermost/mattermost-build-server:${{ needs.go.outputs.version }}
|
|
defaults:
|
|
run:
|
|
working-directory: server
|
|
steps:
|
|
- name: Checkout mattermost project
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
- 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-default-roles-permissions:
|
|
name: Check default roles permissions
|
|
needs: go
|
|
runs-on: ubuntu-22.04
|
|
container: mattermost/mattermost-build-server:${{ needs.go.outputs.version }}
|
|
permissions:
|
|
contents: read
|
|
services:
|
|
postgres:
|
|
image: postgres:14
|
|
env:
|
|
POSTGRES_USER: mmuser
|
|
POSTGRES_PASSWORD: mostest
|
|
options: >-
|
|
--health-cmd pg_isready
|
|
--health-interval 5s
|
|
--health-timeout 5s
|
|
--health-retries 5
|
|
defaults:
|
|
run:
|
|
working-directory: server
|
|
steps:
|
|
- name: Checkout mattermost project
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
- name: Run setup-go-work
|
|
run: make setup-go-work
|
|
- name: Generate default roles permissions
|
|
env:
|
|
IS_CI: "true"
|
|
run: make default-roles-permissions
|
|
- name: Check generated code
|
|
run: if [[ -n $(git status --porcelain) ]]; then echo "Please update the default roles permissions using make default-roles-permissions"; exit 1; fi
|
|
check-mmctl-docs:
|
|
name: Check mmctl docs
|
|
needs: go
|
|
runs-on: ubuntu-22.04
|
|
container: mattermost/mattermost-build-server:${{ needs.go.outputs.version }}
|
|
defaults:
|
|
run:
|
|
working-directory: server
|
|
steps:
|
|
- name: Checkout mattermost-server
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
- 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
|
|
# NOTE: Postgres with binary parameters has been moved to server-ci-weekly.yml
|
|
# (runs Monday 1am EST / 5am UTC). Low regression risk doesn't justify
|
|
# consuming 8-core runners on every push.
|
|
|
|
# -- Sharded into 4 parallel runners for ~88% wall-time improvement --
|
|
test-postgres-normal:
|
|
name: Postgres (shard ${{ matrix.shard }})
|
|
needs: go
|
|
strategy:
|
|
fail-fast: false # Let all shards complete so we get full test results
|
|
matrix:
|
|
shard: [0, 1, 2, 3]
|
|
uses: ./.github/workflows/server-test-template.yml
|
|
secrets: inherit
|
|
with:
|
|
name: "Postgres (shard ${{ matrix.shard }})"
|
|
datasource: postgres://mmuser:mostest@postgres:5432/mattermost_test?sslmode=disable&connect_timeout=10
|
|
drivername: postgres
|
|
# Each shard gets a unique artifact name so they don't collide
|
|
logsartifact: "postgres-server-test-logs-shard-${{ matrix.shard }}"
|
|
enablecoverage: ${{ github.event_name != 'pull_request' || !startsWith(github.event.pull_request.base.ref, 'release-') }}
|
|
go-version: ${{ needs.go.outputs.version }}
|
|
fips-enabled: false
|
|
shard-index: ${{ matrix.shard }}
|
|
shard-total: 4
|
|
# -- Merge test results (handles both single-run and future sharded runs) --
|
|
merge-postgres-test-results:
|
|
name: Merge Postgres Test Results
|
|
needs: test-postgres-normal
|
|
if: always()
|
|
uses: ./.github/workflows/server-test-merge-template.yml
|
|
with:
|
|
artifact-pattern: postgres-server-test-logs-shard-*
|
|
artifact-name: postgres-server-test-logs
|
|
save-timing-cache: true
|
|
all-shards-passed: ${{ needs.test-postgres-normal.result == 'success' }}
|
|
|
|
test-elasticsearch-v8:
|
|
name: Elasticsearch v8 Compatibility
|
|
needs: go
|
|
uses: ./.github/workflows/server-test-template.yml
|
|
secrets: inherit
|
|
with:
|
|
name: Elasticsearch v8 Compatibility
|
|
datasource: postgres://mmuser:mostest@postgres:5432/mattermost_test?sslmode=disable&connect_timeout=10
|
|
drivername: postgres
|
|
logsartifact: elasticsearch-v8-server-test-logs
|
|
go-version: ${{ needs.go.outputs.version }}
|
|
fips-enabled: false
|
|
elasticsearch-version: "8.9.0"
|
|
test-target: "test-server-elasticsearch"
|
|
|
|
test-opensearch-v2:
|
|
name: OpenSearch v2 Compatibility
|
|
needs: go
|
|
uses: ./.github/workflows/server-test-template.yml
|
|
secrets: inherit
|
|
with:
|
|
name: OpenSearch v2 Compatibility
|
|
datasource: postgres://mmuser:mostest@postgres:5432/mattermost_test?sslmode=disable&connect_timeout=10
|
|
drivername: postgres
|
|
logsartifact: opensearch-v2-server-test-logs
|
|
go-version: ${{ needs.go.outputs.version }}
|
|
fips-enabled: false
|
|
opensearch-version: "2.19.0"
|
|
test-target: "test-server-opensearch"
|
|
|
|
# FIPS tests: run on PRs when go.mod changed or branch name contains "fips".
|
|
# Sharded for fast iteration. Weekly workflow provides regular full coverage.
|
|
test-postgres-normal-fips:
|
|
if: contains(github.head_ref, 'fips') || needs.go.outputs.gomod-changed == 'true'
|
|
name: "Postgres FIPS (shard ${{ matrix.shard }})"
|
|
needs: go
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
shard: [0, 1, 2, 3]
|
|
uses: ./.github/workflows/server-test-template.yml
|
|
secrets: inherit
|
|
with:
|
|
name: "Postgres FIPS (shard ${{ matrix.shard }})"
|
|
datasource: postgres://mmuser:mostest-fips-test@postgres:5432/mattermost_test?sslmode=disable&connect_timeout=10
|
|
drivername: postgres
|
|
logsartifact: "postgres-server-fips-test-logs-shard-${{ matrix.shard }}"
|
|
go-version: ${{ needs.go.outputs.version }}
|
|
fips-enabled: true
|
|
shard-index: ${{ matrix.shard }}
|
|
shard-total: 4
|
|
merge-postgres-fips-test-results:
|
|
name: Merge Postgres FIPS Test Results
|
|
needs: test-postgres-normal-fips
|
|
if: needs.test-postgres-normal-fips.result != 'skipped'
|
|
uses: ./.github/workflows/server-test-merge-template.yml
|
|
with:
|
|
artifact-pattern: postgres-server-fips-test-logs-shard-*
|
|
artifact-name: postgres-server-fips-test-logs
|
|
|
|
test-mmctl:
|
|
name: Run mmctl tests
|
|
needs: go
|
|
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
|
|
go-version: ${{ needs.go.outputs.version }}
|
|
fips-enabled: false
|
|
test-mmctl-fips:
|
|
if: contains(github.head_ref, 'fips') || needs.go.outputs.gomod-changed == 'true'
|
|
name: Run mmctl tests (FIPS)
|
|
needs: go
|
|
uses: ./.github/workflows/mmctl-test-template.yml
|
|
secrets: inherit
|
|
with:
|
|
name: mmctl
|
|
datasource: postgres://mmuser:mostest-fips-test@postgres:5432/mattermost_test?sslmode=disable&connect_timeout=10
|
|
drivername: postgres
|
|
logsartifact: mmctl-fips-test-logs
|
|
go-version: ${{ needs.go.outputs.version }}
|
|
fips-enabled: true
|
|
|
|
build-mattermost-server:
|
|
name: Build mattermost server app
|
|
needs: go
|
|
runs-on: ubuntu-22.04
|
|
container: mattermost/mattermost-build-server:${{ needs.go.outputs.version }}
|
|
defaults:
|
|
run:
|
|
working-directory: server
|
|
env:
|
|
BUILD_NUMBER: "${GITHUB_HEAD_REF}-${GITHUB_RUN_ID}"
|
|
FIPS_ENABLED: false
|
|
steps:
|
|
- name: Checkout mattermost project
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
- name: ci/setup-node
|
|
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
|
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
|
|
make package
|
|
- name: Persist dist artifacts
|
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
with:
|
|
name: server-dist-artifact
|
|
path: server/dist/
|
|
if-no-files-found: error
|
|
compression-level: 0
|
|
retention-days: 2
|
|
- name: Persist build artifacts
|
|
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository
|
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
with:
|
|
name: server-build-artifact
|
|
path: server/build/
|
|
retention-days: 2
|