Commit Graph

124 Commits

Author SHA1 Message Date
Mario Vitale
dc36e42448 CLD-798 Add support for MM_ENV, various fixes (#26616)
* Add support for MM_ENV, various fixes
* Fix workflow template
* Fix reporting steps ordering
* Fix typo
* Improve state check message description
* Fix workflow syntax
* Fix fulltest variable generation
* Fix PR_NUMBER variable usage
* Fix BUILD_ID, add dashboard URL to status check
* Fix automation dashboard URL

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2024-04-03 12:14:19 +02:00
Agniva De Sarker
5e851f708b MM-57245: Bump up Go version to 1.21 (#26512)
* MM-57245: Bump up Go version to 1.21

https://mattermost.atlassian.net/browse/MM-57245
```release-note
NONE
```
2024-03-21 09:12:35 +05:30
Mario Vitale
d7a77d8c42 CLD-7074 Implement full E2E tests on Github Actions (#26093)
* Move license setting from env var to mmctl upload
* Extract common E2E steps
* Add E2E fulltests
* Fix plugin_startup_fail_spec.js, timeout runners, fix local dashboard run
* Implement reporting script and job
* Bump artifact related actions
* Fix E2E variable generator script
* Skip reporting steps if not required
* Get rid of deprecation warnings
* Fix inbucket hostname parameter
* Support arbitrary refs in test template
* Fix cycle BRANCH var for non-PR commits
---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2024-03-06 11:27:53 +01:00
Antonis Stamatiou
cafcc2ac06 feat: Upgrade github actions for node20 (#26318) 2024-02-28 10:55:04 +02:00
Agniva De Sarker
f4fbc90e23 Move all PR tests to free tier (#25930)
After moving only contributor PRs to free tier it was
observed that the tests actually finish faster in free tier
than with larger runners. We have let the change soak for about
a month now without any issues.

Therefore we move to free tier runners for all PRs.
```release-note
NONE
```

Co-authored-by: Mattermost Build <build@mattermost.com>
2024-01-17 09:10:38 +05:30
Agniva De Sarker
04cf1ed114 Bump up the minimum required MySQL version (#25465)
MySQL 5.7 is at end of life.

https://mattermost.atlassian.net/browse/MM-55589

```release-note
We bump up minimum MySQL version to be 8.0.0
```


Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>
2024-01-11 22:18:20 +05:30
Antonis Stamatiou
f118b4f0ed fix: Fix condition for choosing runner (#25779)
* fix: Fix condition for choosing runner

* fix: Automate the GO_VERSION choice on server tests
2023-12-19 17:21:13 +02:00
Agniva De Sarker
983062189e Run contributor PR tests on free tier (#25745)
```release-note
NONE
```
2023-12-18 16:47:39 +05:30
Antonis Stamatiou
8158c0e614 feat: Add docker image on artifacts generation summary (#25469) 2023-11-20 09:45:19 +02:00
Antonis Stamatiou
7bf9be2619 fix: Add new dev registry for pr artifacts (#25341) 2023-11-14 15:04:00 +02:00
Nicolas Le Cam
1ed5d87342 Switch to docker compose v2 (#25048) 2023-11-13 14:30:24 +01:00
Jesse Hallam
c9e71a2dde Remove workflow failure check in favour of Argo-driven version (#25366)
* Simplify workflow failure check

Consolidate the workflow failure check directly into *-master.yml. This results in some code duplication, but makes it much clearer as to what's going on. While we're in here, remove the legacy reference to the `monorepo` branch when triggering.

* just remove the workflow in favour of the Argo version
2023-11-09 12:01:49 -04:00
Mario Vitale
2e7728b737 Fix the monorepo-checker CI job (#25287) 2023-11-03 17:31:42 +01:00
Mario Vitale
5d1cb1b931 Fix - Run artifacts workflow only for monorepo branches (#25279)
* Run artifacts jobs conditionally, add test change

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-11-03 16:10:40 +01:00
Antonis Stamatiou
fc87054f14 feat: Introduce go-version file to support multiple go versions on CI (#25271) 2023-11-03 16:25:54 +02:00
Jesse Hallam
83bd2746c3 fix yaml formatting issue (#25252) 2023-10-31 18:27:06 -03:00
Jesse Hallam
37dc35c1a1 report master/release-* failures (#25197) 2023-10-30 12:09:19 -03:00
Antonis Stamatiou
f01e8f6c6d [CLD-6501] Enhance visibility for PR builds artefacts (#25141)
Co-authored-by: Akis Maziotis <akis.maziotis@mattermost.com>
2023-10-25 18:22:15 +03:00
Jesse Hallam
c2bc4008fc prevent modifying non-English translation files (#25002) 2023-10-19 14:40:06 -03:00
Jesse Hallam
0577a5aaa2 Fix OpenApi vetting (#23974)
* fix openApi vetting

The underlying mattermost-govet tool effectively hasn't been called for some time, as we weren't checking out and building the spec files to pass. Now that hte API is in the monorepo, build it locally and check against it.

Unfortunately, our API documentation isn't up-to-date, and this PR isn't fixing that. For now, add a discrete `make vet-api` and workflow that won't block the build until the API documentation is back in sync and can be merged into the existing `make vet` directive.

* mattermost-govet: use upstream@new

* fix missing /api/v4 prefix for commands autocomplete suggestion

* document /api/v4/ldap/users/{user_id}/group_sync_memberships

* document /api/v4/groups/{group_id}/restore

* fix /files/{file_id}/public actually at root

* document /api/v4/users/invalid_emails

* fix SetThreadUnreadByPostId

* Revert "fix SetThreadUnreadByPostId"

This reverts commit b16bcc8044.

* Revert "Revert "fix SetThreadUnreadByPostId""

This reverts commit 8bda05dc8a.

* workaround undocumented API endpoints

* remove unnecessary whiteline

* ignore go tool output

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-10-16 11:27:43 -03:00
Agniva De Sarker
bd982356a7 Move mmctl CI tests to free tier (#24899)
Only the -race tests in master branch takes
more memory. So it will take more time, but there's no
need to optimize run time in master as nobody
is waiting for it to complete.

```release-note
NONE
```
2023-10-13 21:09:36 +05:30
Agniva De Sarker
4f279a1dd9 Set env vars properly when running mmctl tests (#24842)
Exporting a variable doesn't really pass that
down to the docker container. We pass the `--env`
variable manually.

```release-note
NONE
```

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-10-11 11:12:18 +05:30
Agniva De Sarker
fcf238523f Optimize mmctl CI run (#24732)
* Optimize mmctl CI run

- Remove coverage mode. They increase run time by 3x.
- Remove -race mode in PR builds. They increase run time by 2x and memory consumption as well.

```release-note
NONE
```

* caching go.sum path

```release-note
NONE
```
2023-10-06 10:43:06 -03:00
Jesse Hallam
d99901aeb4 Report flaky tests directly on a PR (#24615)
Co-authored-by: Mattermost Build <build@mattermost.com>
2023-09-27 10:14:54 -03:00
Mario Vitale
1e121eb7f3 CLD-6297 - E2E tests improvements (#24541)
* Improve e2etests readme, remove unused apt install
* Add testing E2E Tests MultiOS
* Get rid of deprecation warning
* Smart selection of docker network driver for different OSes
* Unify makefile invocation for windows as well
* Tune JVM for ES and Keycloak
* fix: Made required changes to run locally on arm MacOS
* fix: FIxed network command and removed dashboard node user as it is not needed
* fix: make dashboard work for Mac
* Make runs without dashboard work again, make BROWSE tunable and document it

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Antonis Stamatiou <stamatiou.antonis@gmail.com>
2023-09-25 17:01:01 +02:00
Jesse Hallam
e9cc03c1c8 Constrain when we emit webhooks for retried tests (#24484)
* Constrain when we emit webhooks for retried tests

Only send webhooks (notifying all staff developers) only for retried tests on `master` and `release-*`.

* drop @devs at-mention

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-09-11 09:58:01 -03:00
Ibrahim Serdar Acikgoz
0e84ccb383 Bump Go version to v1.20 (#24439) 2023-09-07 13:06:18 +03:00
Antonis Stamatiou
dfbe0c14e7 fix: Update scorecard workflow (#24457) 2023-09-04 13:49:49 +03:00
Caleb Roseland
818225dffe MM-52981, MM-53559: Streamlined in-product marketplace (#24311) 2023-08-25 14:39:25 -05:00
Ibrahim Serdar Acikgoz
83652aa3c2 [MM-53840] Add migration workflow (#24211) 2023-08-16 10:09:11 +03:00
Jesse Hallam
544ceeba3e setup-node for master build from server (#24247) 2023-08-11 10:53:50 -03:00
Harrison Healey
0e30d0abb8 Disable certain actions from running on forks (#23747)
* Disable certain actions from running on forks

* Address some feedback

* Check for forks in build-docker job
2023-08-08 16:45:24 -04:00
Antonis Stamatiou
0e92139bea feat: Introduce workflow to tag server public module (#24190) 2023-08-08 10:16:54 +03:00
Jesse Hallam
f436b3d9a8 remove legacy "Build API specification" workflow (#24142)
Now that the API source is part of the monorepo, this is already handled by the new api workflow, and can simply be removed.
2023-08-02 12:54:16 -03:00
Jesse Hallam
f4bd39d2de Use | and \ vs. > (#24111)
GitHub actions' YAML supports the `>` directive to a multi-line command to be merged into a single line, but requires that all segments have no leading whitespace otherwise they get silently ignored.

Since this is not nearly as obvious as one might expect, fallback to just the `|` syntax using `\` to extend the lines and keep the overall formatting, fixing the reporting of retried tests via curl webhook.
2023-08-01 11:25:51 -03:00
Mario Vitale
dca39ea092 CLD-6003 - Upload smoketest results, better server logs (#24089)
* Upload smoketest results, better server logs
2023-07-24 13:15:19 +02:00
Jesse Hallam
6c821c8b13 drop public submodule replace directive (#24045)
* drop public submodule replace directive

During development of the public/ submodule, a replace directive remained that was both unnecessary and harmful as discussed in https://community.mattermost.com/private-core/pl/w77sh7igwpfb9ecj5o4jjjbbyo.

Remove that, and bump the explicit dependency (even though we use go.work) to v0.0.6 so the import paths match (e.g. `mattermost` vs `mattermost-server`).

* make modules-tidy

* consistently setup-go-work

* fix build-api-spec

* fix mmctl test template

* fix workflow copy/paste typo
2023-07-20 10:45:06 -03:00
Antonis Stamatiou
98da282f7c fix: Add e2e-tests paths for tests trigger (#23894) 2023-07-12 10:52:05 +03:00
Jesse Hallam
82b3b67e63 secrets: inherit, to fix flaky tests report (#23961) 2023-07-06 14:03:14 -03:00
Jesse Hallam
c506e01a97 server: automatically retry CI testing failures (#23820)
* server: --rerun-fails=3 for test-server(-race)?

* --rerun-fails=3 for IS_CI=true and -race as well
2023-06-30 15:00:37 -03:00
Jesse Hallam
d9614cbb12 Move API Reference (#23777)
* merge mattermost-api-reference unchanged

* api: update repostiory paths

* api: drop GitPod for api (for now)

* api: improved node_modules target

* api: relocate GitHub actions to root

* Update .github/workflows/api.yml

Co-authored-by: Antonis Stamatiou <stamatiou.antonis@gmail.com>

* fix cache-dependency-path

* adopt node-version-file

* pin versions for uses

* tidy steps/runs

* api/.gitpod.yml: tidy

* api: rm now unused .gitlab-ci.yml

---------

Co-authored-by: Antonis Stamatiou <stamatiou.antonis@gmail.com>
2023-06-27 11:10:13 -03:00
Alejandro García Montoro
ffb869a6df Skip ESR CI in master (#23807)
* Skip ESR CI in master

* Skip on pull requests as well

* Add comment with ticket link
2023-06-21 10:06:12 +02:00
Jesse Hallam
2765d92991 Gotestsum (#22826)
* disable coverage

This reduces runtime of the server test suite from ~30m to ~10m, and as far as I can see: we discarded the coverage output anyway.

* allow morph 60s to migrate when running tests

* scripts/test.sh: drop COVERMODE

Stop generating coverage data when running unit tests. It's likely we'll want this data back at some point, but for now it's unused and removing simplifies invoking tests for developers.

* scripts/test.sh: remove cleanup steps

* scripts/test.sh: drop TESTS parameter

* scripts/test.sh: drop TESTFLAGS parameter

* switch to gotestsum
2023-06-15 15:27:52 -03:00
Miguel de la Cruz
5d66883b04 Fixes CI (#23753)
* Fixes CI

* Fix client jest dependency
2023-06-15 09:45:54 +02:00
mvitale1989
b8858c4582 CLD-5835 - Do not use the mattermost-build-webapp image from ECR (#23748)
* Only use mattermostdevelopment images
* Fix docker mirroring workflow
* Reenable insights feature for E2E tests
2023-06-15 08:43:39 +02:00
mvitale1989
0d81e5eb40 CLD-5770 - Fix smoketests workflow (#23713)
* fix: Fix proper status update since job.status depicts current job status which is always success
* Rename status check for smoketests
* Allow localhost origin for local testing
* Increase instance size for smoketest job, better status check name

---------
Co-authored-by: Antonis Stamatiou <stamatiou.antonis@gmail.com>
2023-06-13 17:29:36 +02:00
mvitale1989
0445d8348c CLD-5698 - Add e2e smoketests (#23590)
* Prepare: run E2E smoketests with GitHub actions (#23301)
* Port E2E testing scripts from cypress-ui-automation
* Move server to docker-compose, move E2E images to ecrpublic
* Integrate General channel renaming, fixes
* Add local automation-dashboard
 Add readme
* Add E2E smoketests
* Bump postgres to 12
* Fully rely on mattermostdevelopment images

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Saturnino Abril <saturnino.abril@gmail.com>
Co-authored-by: Antonis Stamatiou <stamatiou.antonis@gmail.com>
2023-06-12 11:56:33 +02:00
Agniva De Sarker
f4539bc65a MM-53090: Do not run PG binary tests on master (#23688)
https://mattermost.atlassian.net/browse/MM-53090
```release-note
NONE
```
2023-06-09 21:37:49 +05:30
Julien Tant
0468e772a9 [MM-52926] Deprecating work templates (#23466)
Co-authored-by: Mattermost Build <build@mattermost.com>
2023-06-05 18:42:03 -07:00
Saturnino Abril
1926455a00 Clean up at .github due to repo rename (#23580)
* update .github after repo rename

* update

* Update PULL_REQUEST_TEMPLATE.md

---------

Co-authored-by: M-ZubairAhmed <m-zubairahmed@protonmail.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
2023-06-05 20:12:08 +08:00