mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Merge branch 'master' into fix-boards-webapp-unit-tests
This commit is contained in:
4
.github/codeql/codeql-config.yml
vendored
4
.github/codeql/codeql-config.yml
vendored
@@ -14,6 +14,6 @@ paths-ignore:
|
||||
- templates
|
||||
- tests
|
||||
- 'api4/*_local.go'
|
||||
- webapp/channels/e2e
|
||||
- webapp/channels/tests
|
||||
- '**/*.test.*'
|
||||
- '**/*.test.*'
|
||||
- e2e-tests
|
||||
|
||||
50
.github/workflows/channels-ci.yml
vendored
50
.github/workflows/channels-ci.yml
vendored
@@ -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
|
||||
|
||||
41
.github/workflows/ci.yml
vendored
41
.github/workflows/ci.yml
vendored
@@ -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
|
||||
|
||||
28
.github/workflows/codeql-analysis.yml
vendored
28
.github/workflows/codeql-analysis.yml
vendored
@@ -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
|
||||
|
||||
@@ -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
|
||||
6
.github/workflows/test.yml
vendored
6
.github/workflows/test.yml
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user