Merge branch 'master' into fix-boards-webapp-unit-tests

This commit is contained in:
Caleb Roseland
2023-03-29 09:37:24 -05:00
1364 changed files with 4408 additions and 4279 deletions

View File

@@ -14,6 +14,6 @@ paths-ignore:
- templates
- tests
- 'api4/*_local.go'
- webapp/channels/e2e
- webapp/channels/tests
- '**/*.test.*'
- '**/*.test.*'
- e2e-tests

View File

@@ -5,6 +5,9 @@ on:
branches:
- master
- mono-repo*
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
defaults:
run:
shell: bash
@@ -29,14 +32,14 @@ jobs:
# with:
# path: |
# '**/node_modules'
# 'e2e/playwright/node_modules'
# 'e2e/cypress/node_modules'
# key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('e2e/cypress/package-lock.json') }}-${{ hashFiles('e2e/playwright/package-lock.json') }}
# 'e2e-tests/playwright/node_modules'
# 'e2e-tests/cypress/node_modules'
# key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('e2e-tests/cypress/package-lock.json') }}-${{ hashFiles('e2e-tests/playwright/package-lock.json') }}
- name: ci/get-node-modules
# if: steps.npm-cache.outputs.cache-hit != 'true'
run: |
make node_modules
# make channels/e2e/playwright/node_modules
# make channels/e2e-tests/playwright/node_modules
- name: ci/lint
run: |
npm run check
@@ -60,14 +63,14 @@ jobs:
# with:
# path: |
# '**/node_modules'
# 'e2e/playwright/node_modules'
# 'e2e/cypress/node_modules'
# key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('e2e/cypress/package-lock.json') }}-${{ hashFiles('e2e/playwright/package-lock.json') }}
# 'e2e-tests/playwright/node_modules'
# 'e2e-tests/cypress/node_modules'
# key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('e2e-tests/cypress/package-lock.json') }}-${{ hashFiles('e2e-tests/playwright/package-lock.json') }}
- name: ci/get-node-modules
# if: steps.npm-cache.outputs.cache-hit != 'true'
run: |
make node_modules
# make channels/e2e/playwright/node_modules
# make channels/e2e-tests/playwright/node_modules
- name: ci/lint
working-directory: webapp/channels
run: |
@@ -100,14 +103,14 @@ jobs:
# with:
# path: |
# '**/node_modules'
# 'e2e/playwright/node_modules'
# 'e2e/cypress/node_modules'
# key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('e2e/cypress/package-lock.json') }}-${{ hashFiles('e2e/playwright/package-lock.json') }}
# 'e2e-tests/playwright/node_modules'
# 'e2e-tests/cypress/node_modules'
# key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('e2e-tests/cypress/package-lock.json') }}-${{ hashFiles('e2e-tests/playwright/package-lock.json') }}
- name: ci/get-node-modules
# if: steps.npm-cache.outputs.cache-hit != 'true'
run: |
make node_modules
# make channels/e2e/playwright/node_modules
# make channels/e2e-tests/playwright/node_modules
- name: ci/lint
run: |
npm run check-types
@@ -135,14 +138,14 @@ jobs:
# with:
# path: |
# '**/node_modules'
# 'e2e/playwright/node_modules'
# 'e2e/cypress/node_modules'
# key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('e2e/cypress/package-lock.json') }}-${{ hashFiles('e2e/playwright/package-lock.json') }}
# 'e2e-tests/playwright/node_modules'
# 'e2e-tests/cypress/node_modules'
# key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('e2e-tests/cypress/package-lock.json') }}-${{ hashFiles('e2e-tests/playwright/package-lock.json') }}
- name: ci/get-node-modules
# if: steps.npm-cache.outputs.cache-hit != 'true'
run: |
make node_modules
# make channels/e2e/playwright/node_modules
# make channels/e2e-tests/playwright/node_modules
- name: ci/test
env:
NODE_OPTIONS: --max_old_space_size=5120
@@ -151,13 +154,6 @@ jobs:
npm run test-ci --workspace=channels
npm run test-ci --workspace=platform/client
npm run test-ci --workspace=playbooks
- name: ci/publish-test-results
uses: EnricoMi/publish-unit-test-result-action@a3caf02865c0604ad3dc1ecfcc5cdec9c41b7936 # v2.3.0
if: always()
with:
junit_files: "webapp/channels/build/**/*.xml"
comment_mode: always
compare_to_earlier_commit: false
build:
runs-on: ubuntu-22.04
defaults:
@@ -178,14 +174,14 @@ jobs:
# with:
# path: |
# '**/node_modules'
# 'e2e/playwright/node_modules'
# 'e2e/cypress/node_modules'
# key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('e2e/cypress/package-lock.json') }}-${{ hashFiles('e2e/playwright/package-lock.json') }}
# 'e2e-tests/playwright/node_modules'
# 'e2e-tests/cypress/node_modules'
# key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('e2e-tests/cypress/package-lock.json') }}-${{ hashFiles('e2e-tests/playwright/package-lock.json') }}
- name: ci/get-node-modules
# if: steps.npm-cache.outputs.cache-hit != 'true'
run: |
make node_modules
# make channels/e2e/playwright/node_modules
# make channels/e2e-tests/playwright/node_modules
- name: ci/build
run: |
npm run build

View File

@@ -7,6 +7,11 @@ on:
- cloud
- release-*
- mono-repo*
env:
go-version: "1.19.5"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
jobs:
check-mocks:
name: Check mocks
@@ -17,6 +22,10 @@ jobs:
steps:
- name: Checkout mattermost-server
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- name: Setup Go
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
with:
go-version: ${{ env.go-version }}
- name: Generate mocks
run: make mocks
- name: Check mocks
@@ -30,6 +39,10 @@ jobs:
steps:
- name: Checkout mattermost-server
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- name: Setup Go
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
with:
go-version: ${{ env.go-version }}
- name: Run go mod tidy
run: make modules-tidy
- name: Check modules
@@ -43,6 +56,10 @@ jobs:
steps:
- name: Checkout mattermost-server
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- name: Setup Go
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
with:
go-version: ${{ env.go-version }}
- name: Run make-gen-serialized
run: make gen-serialized
- name: Check serialized
@@ -56,6 +73,10 @@ jobs:
steps:
- name: Checkout mattermost-server
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- name: Setup Go
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
with:
go-version: ${{ env.go-version }}
- name: Reset config
run: make config-reset
- name: Run plugin-checker
@@ -81,6 +102,10 @@ jobs:
steps:
- name: Checkout mattermost-server
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- name: Setup Go
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
with:
go-version: ${{ env.go-version }}
- name: Checkout mattermost-api-reference
run: |
cd ..
@@ -99,6 +124,10 @@ jobs:
steps:
- name: Checkout mattermost-server
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- name: Setup Go
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
with:
go-version: ${{ env.go-version }}
- name: Generate work templates
run: make generate-worktemplates
- name: Check generated work templates
@@ -127,6 +156,10 @@ jobs:
steps:
- name: Checkout mattermost-server
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- name: Setup Go
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
with:
go-version: ${{ env.go-version }}
- name: Generate store layers
run: make store-layers
- name: Check generated code
@@ -140,6 +173,10 @@ jobs:
steps:
- name: Checkout mattermost-server
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- name: Setup Go
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
with:
go-version: ${{ env.go-version }}
- name: Generate app layers
run: make app-layers
- name: Check generated code
@@ -175,6 +212,10 @@ jobs:
steps:
- name: Checkout mattermost-server
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- name: Setup Go
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
with:
go-version: ${{ env.go-version }}
- name: Build
run: |
make config-reset

View File

@@ -1,12 +1,16 @@
name: "CodeQL"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
on:
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '30 5,17 * * *'
permissions:
contents: read
@@ -20,7 +24,7 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'go' ]
language: [ 'go', 'javascript' ]
steps:
- name: Checkout repository
@@ -32,14 +36,26 @@ jobs:
with:
languages: ${{ matrix.language }}
debug: false
config-file: ./.github/codeql/codeql-config.yml
- name: Build
config-file: ./.github/codeql/codeql-config.yml
- name: Build JavaScript
uses: github/codeql-action/autobuild@v2
if: ${{ matrix.language == 'javascript' }}
- name: Setup go
uses: actions/setup-go@v2
with:
go-version: '1.20'
if: ${{ matrix.language == 'go' }}
- name: Build Golang
run: |
cd server
make setup-go-work
make build-linux-amd64
if: ${{ matrix.language == 'go' }}
# Perform Analysis
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v2

View File

@@ -1,10 +1,13 @@
name: mattermost-e2e
name: mattermost-e2e-tests
on:
pull_request:
push:
branches:
- master
- mono-repo*
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
defaults:
run:
shell: bash
@@ -13,7 +16,7 @@ jobs:
runs-on: ubuntu-22.04
defaults:
run:
working-directory: e2e/cypress
working-directory: e2e-tests/cypress
steps:
- name: ci/checkout-repo
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
@@ -23,7 +26,7 @@ jobs:
with:
node-version-file: ".nvmrc"
cache: npm
cache-dependency-path: 'e2e/cypress/package-lock.json'
cache-dependency-path: 'e2e-tests/cypress/package-lock.json'
- name: ci/cypress/npm-install
run: |
npm ci
@@ -34,7 +37,7 @@ jobs:
runs-on: ubuntu-22.04
defaults:
run:
working-directory: e2e/playwright
working-directory: e2e-tests/playwright
steps:
- name: ci/checkout-repo
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
@@ -44,7 +47,7 @@ jobs:
with:
node-version-file: ".nvmrc"
cache: npm
cache-dependency-path: 'e2e/playwright/package-lock.json'
cache-dependency-path: 'e2e-tests/playwright/package-lock.json'
- name: ci/get-webapp-node-modules
working-directory: webapp
# requires build of client and types

View File

@@ -8,6 +8,8 @@ on:
drivername:
required: true
type: string
env:
go-version: "1.19.5"
jobs:
run-tests:
runs-on: ubuntu-latest-8-cores
@@ -17,6 +19,10 @@ jobs:
steps:
- name: Checkout mattermost-server
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- name: Setup Go
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
with:
go-version: ${{ env.go-version }}
- name: Run docker compose
run: |
cd server/build

34
.gitignore vendored
View File

@@ -23,25 +23,25 @@ config/logging.json
/plugins
# disable folders generated by Cypress
e2e/cypress/node_modules
e2e/cypress/tests/downloads
e2e/cypress/tests/screenshots
e2e/cypress/tests/videos
e2e/cypress/tests/integration/benchmark/__benchmarks__
e2e/cypress/tests/integration/performance/logs
e2e/cypress/tests/fixtures/ldap_tmp
e2e/cypress/tests/fixtures/mmctl
e2e/cypress/results
e2e/cypress/.eslintcache
e2e-tests/cypress/node_modules
e2e-tests/cypress/tests/downloads
e2e-tests/cypress/tests/screenshots
e2e-tests/cypress/tests/videos
e2e-tests/cypress/tests/integration/benchmark/__benchmarks__
e2e-tests/cypress/tests/integration/performance/logs
e2e-tests/cypress/tests/fixtures/ldap_tmp
e2e-tests/cypress/tests/fixtures/mmctl
e2e-tests/cypress/results
e2e-tests/cypress/.eslintcache
# disable files/folders generated by Playwright
e2e/playwright/node_modules
e2e/playwright/playwright-report
e2e/playwright/storage_state
e2e/playwright/test-results
e2e/playwright/tests/**/*-darwin.png
e2e/playwright/tests/**/*-window.png
e2e/playwright/.eslintcache
e2e-tests/playwright/node_modules
e2e-tests/playwright/playwright-report
e2e-tests/playwright/storage_state
e2e-tests/playwright/test-results
e2e-tests/playwright/tests/**/*-darwin.png
e2e-tests/playwright/tests/**/*-window.png
e2e-tests/playwright/.eslintcache
# Enterprise & products imports files
imports/imports.go

View File

@@ -7,7 +7,7 @@ stages:
include:
- project: mattermost/ci/mattermost-server
ref: monorepo-testing
ref: master
file: private.yml
variables:

View File

@@ -1 +1,9 @@
/plugin/ @mattermost/toolkit
/.github/workflows/channels-ci.yml @mattermost/web-platform
/webapp/package.json @mattermost/web-platform
/webapp/channels/package.json @mattermost/web-platform
/webapp/Makefile @mattermost/web-platform
/webapp/package-lock.json @mattermost/web-platform
/webapp/platform/*/package.json @mattermost/web-platform
/webapp/scripts @mattermost/web-platform

View File

@@ -11,8 +11,8 @@ You may be licensed to use source code to create compiled versions not produced
1. Under the Free Software Foundations GNU AGPL v.3.0, subject to the exceptions outlined in this policy; or
2. Under a commercial license available from Mattermost, Inc. by contacting commercial@mattermost.com
You are licensed to use the source code in Admin Tools and Configuration Files (templates/, config/default.json, i18n/, model/,
plugin/ and all subdirectories thereof) under the Apache License v2.0.
You are licensed to use the source code in Admin Tools and Configuration Files (server/templates/, server/i18n/, model/,
plugin/, server/boards/, server/playbooks/, webapp/ and all subdirectories thereof) under the Apache License v2.0.
We promise that we will not enforce the copyleft provisions in AGPL v3.0 against you if your application (a) does not
link to the Mattermost Platform directly, but exclusively uses the Mattermost Admin Tools and Configuration Files, and

View File

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

Before

Width:  |  Height:  |  Size: 341 KiB

After

Width:  |  Height:  |  Size: 341 KiB

View File

Before

Width:  |  Height:  |  Size: 769 KiB

After

Width:  |  Height:  |  Size: 769 KiB

View File

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

Before

Width:  |  Height:  |  Size: 356 B

After

Width:  |  Height:  |  Size: 356 B

View File

Before

Width:  |  Height:  |  Size: 559 B

After

Width:  |  Height:  |  Size: 559 B

View File

Before

Width:  |  Height:  |  Size: 382 B

After

Width:  |  Height:  |  Size: 382 B

View File

Before

Width:  |  Height:  |  Size: 514 B

After

Width:  |  Height:  |  Size: 514 B

View File

Before

Width:  |  Height:  |  Size: 114 KiB

After

Width:  |  Height:  |  Size: 114 KiB

View File

Before

Width:  |  Height:  |  Size: 470 KiB

After

Width:  |  Height:  |  Size: 470 KiB

View File

Before

Width:  |  Height:  |  Size: 611 KiB

After

Width:  |  Height:  |  Size: 611 KiB

View File

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 956 B

After

Width:  |  Height:  |  Size: 956 B

View File

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

Before

Width:  |  Height:  |  Size: 89 KiB

After

Width:  |  Height:  |  Size: 89 KiB

Some files were not shown because too many files have changed in this diff Show More