Doug Lauder
2023-03-22 17:22:27 -04:00
коммит произвёл GitHub
родитель b61c096497
Коммит c943ed6859
13276 изменённых файлов: 1695615 добавлений и 223189 удалений

72
webapp/channels/.github/PULL_REQUEST_TEMPLATE.md поставляемый Обычный файл
Просмотреть файл

@@ -0,0 +1,72 @@
<!-- Thank you for contributing a pull request! Here are a few tips to help you:
1. If this is your first contribution, make sure you've read the Contribution Checklist https://developers.mattermost.com/contribute/getting-started/contribution-checklist/
2. Read our blog post about "Submitting Great PRs" https://developers.mattermost.com/blog/2019-01-24-submitting-great-prs
3. Take a look at other repository specific documentation at https://developers.mattermost.com/contribute
-->
#### Summary
<!--
A description of what this pull request does.
-->
#### Ticket Link
<!--
If this pull request addresses a Help Wanted ticket, please link the relevant GitHub issue, e.g.
Fixes https://github.com/mattermost/mattermost-server/issues/XXXXX
Otherwise, link the JIRA ticket.
-->
#### Related Pull Requests
<!--
List all PRs related to resolving a ticket. For instance, if you submitted a PR to `mattermost/mattermost-server`, please include it here.
-->
- Has server changes (please link here)
- Has mobile changes (please link here)
#### Screenshots
<!--
If the PR includes UI changes, include screenshots/GIFs.
For an easier comparison of UI changes a table (template below) can be used.
| before | after |
|----|----|
| <insert before screenshot here> | <insert after screenshot here> |
-->
#### Release Note
<!--
Add a release note for each of the following conditions:
* Config changes (additions, deletions, updates)
* API additions—new endpoint, new response fields, or newly accepted request parameters
* Database changes (any)
* Websocket additions or changes
* Anything noteworthy to a Mattermost instance administrator (err on the side of over-communicating)
* New features and improvements, including behavioural changes, UI changes and CLI changes
* Bug fixes and fixes of previous known issues
* Deprecation warnings, breaking changes, or compatibility notes
If no release notes are required write NONE. Use past-tense. Newlines are stripped.
Examples:
```
Added new API endpoints POST /api/v4/foo, GET api/v4/foo, and GET api/v4/foo/:foo_id.
```
```
Added a new config setting ServiceSettings.FooBar. Added a new column Foo to the Users table.
```
```
NONE
```
-->
```release-note
```

99
webapp/channels/.github/workflows/performance-benchmarks.yml поставляемый Обычный файл
Просмотреть файл

@@ -0,0 +1,99 @@
name: Performance Benchmarks
on:
workflow_call:
jobs:
cypress-run:
runs-on: ubuntu-latest-4-cores
name: Run Cypress benchmarks
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: mostest
POSTGRES_USER: mmuser
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: Check out web app
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16.10.0
- name: Download and install Cypress
uses: cypress-io/github-action@v5
with:
runTests: false
working-directory: e2e/cypress
- name: Download the thing
working-directory: e2e/cypress
run: |
if [[ "${{ github.event.pull_request.head.sha }}" != "" ]]; then
echo "Using server build from pr-builds.mattermost.com"
curl https://pr-builds.mattermost.com/mattermost-webapp/commit/${{ github.event.pull_request.head.sha }}/mattermost-enterprise-linux-amd64.tar.gz > mattermost.tar.gz
tar xf mattermost.tar.gz
else
echo "Using server build from releases.mattermost.com with web app build from pr-builds.mattermost.com"
# Note that the server commit might not be the latest if we merge server and web app branches at the same time
curl https://s3.amazonaws.com/releases.mattermost.com/gitlab/bundle/${{ github.ref_name }}/mattermost-enterprise-linux-amd64.tar.gz > mattermost-server.tar.gz
curl https://pr-builds.mattermost.com/mattermost-webapp/commit/${{ github.sha }}/mattermost-webapp.tar.gz > mattermost-webapp.tar.gz
# Unzip the server, replace the web app, and re-add product files
tar xf mattermost-server.tar.gz
mv mattermost/client client-original
tar xf mattermost-webapp.tar.gz
mv client mattermost
mv client-original/products mattermost/client/products
fi
- name: Run the E2E tests
uses: cypress-io/github-action@v5
with:
browser: chrome
config: video=true,videosFolder=tests/videos
install: false
spec: ./tests/integration/performance/*
start: npm run benchmarks:run-server
wait-on: http://localhost:8065
working-directory: e2e/cypress
env:
MM_LOGSETTINGS_ENABLECONSOLE: false
MM_LOGSETTINGS_FILELEVEL: debug
MM_SQLSETTINGS_DATASOURCE: postgres://mmuser:mostest@localhost/postgres?sslmode=disable&connect_timeout=10&binary_parameters=yes
MM_TEAMSETTINGS_ENABLEOPENSERVER: true
- name: Upload Cypress logs
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: Cypress logs
path: e2e/cypress/tests/integration/performance/logs/
retention-days: 3
- name: Upload Mattermost logs
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: Mattermost logs
path: e2e/cypress/mattermost/logs/mattermost.log
retention-days: 3
- name: Upload screenshots
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: Test screenshots
path: e2e/cypress/tests/screenshots
retention-days: 3
- name: Upload videos
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: Test Videos
path: e2e/cypress/tests/videos