321 Commits

Author SHA1 Message Date
David Taylor
8c9885d0bf
Revert "DEV: Adds empty device screenshot workflow file (#31521)" (#31973)
This reverts commit 0af0087c77a46f92662b5072190aa3823638d6f0.
2025-03-24 12:01:13 +00:00
Alan Guo Xiang Tan
f6860dcb92
DEV: Remove installing minio binaries in tests workflow (#31652)
In the `discourse/discourse_test:release` base image, the minio binaries
are already being installed and updated on a daily basis. There is also
no
real need for us to have to run the latest minio binaries once it is
released. As such, we can drop the step in the `tests` workflow.
2025-03-06 10:04:07 +11:00
Loïc Guitaut
4b3044565d DEV: Check Gemfile.lock is up to date on CI 2025-03-04 16:29:50 +01:00
Jarek Radosz
024d752083
DEV: Remove extraneous rubocop arguments (#31596)
1. `--parallel` is the default
2. it runs in the current directory by default
2025-03-04 01:28:26 +01:00
Martin Brennan
0af0087c77
DEV: Adds empty device screenshot workflow file (#31521)
This is for continued experimentation in
https://github.com/discourse/discourse/pull/31410,
GitHub does not react to the issue_comment event unless the workflow
file is in main already,
see
https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#issue_comment

This workflow is a noop, it will be actually written/tested
in the linked PR
2025-02-27 10:07:29 +10:00
David Taylor
00907363d4
DEV: Drop ember-cli-based SCSS and locale compilation (#31407)
This totally separate SCSS and i18n compilation pipelines only existed
so that we could run `ember exam` in CI without starting Rails.

Now that our CI has such heavy caching of Ruby dependencies and database
migrations, the speed benefit of this is not worth the cost of
maintaining these separate pipelines.

Therefore, this commit removes that system, and updates CI to use
`bin/rake qunit:test`. That will start up a Rails server and proxy
stylesheet/locale requests to it. This strategy was already used for our
theme and plugin qunit test runs.
2025-02-21 11:15:04 +00:00
Jarek Radosz
3e22fc8ba2
DEV: Update sass gems/package (#31396)
…and temporarily silence the new deprecations: color-functions, import, global-builtin.
2025-02-19 20:04:17 +01:00
Jarek Radosz
6c70825d3d
DEV: Fix pnpm dedupe workflow branch matching (#31322)
It was missing branches for updated namespaced packages
2025-02-12 23:22:26 +01:00
Jarek Radosz
b290c557b8
DEV: Don't run scripts on pnpm dedupe (#31274) 2025-02-11 13:57:02 +01:00
David Taylor
db139534d2
DEV: Drop d-crowd plugin from official list (#31258)
This repo was archived in March 2024 and is no longer supported.

Commit also fixes up the plugin-gem-symlinking logic to support removing
plugins from the list
2025-02-10 15:08:31 +00:00
Jarek Radosz
09bc785fbf
DEV: Fix pnpm dedupe workflow and lock pnpm version (#31244)
Co-authored-by: Discourse CI <ci@ci.invalid>
2025-02-10 14:18:52 +01:00
David Taylor
6d6e9c174d
DEV: Switch to 'unstable' glint dependencies (#31169)
This may help to resolve the "ScriptType" errors we're seeing in the
language server
2025-02-04 17:32:00 +00:00
Jarek Radosz
1613770290
DEV: Add a message to dedupe / mind the exit code (#31070) 2025-01-30 13:13:57 +01:00
Jarek Radosz
42aea3ff1c
DEV: Fix the dedupe workflow (#31067)
(and specify permissions)
2025-01-30 12:56:03 +01:00
Jarek Radosz
7dcae416ad
DEV: Run pnpm dedupe on Dependabot PRs (#30950) 2025-01-28 13:16:33 +01:00
David Taylor
2f19b17cd7
DEV: Remove DISCOURSE_HOSTNAME from test workflow (#30984)
This could cause assets (e.g. fonts) to try and load from
`www.example.com`, which led to an error. In the case of theme-qunit
tests this actually caused the run to fail. Not entirely sure why...
font failures shouldn't be catastrophic... but this is a good fix
regardless.
2025-01-24 10:35:57 +01:00
David Taylor
d88ee33eb6
DEV: Introduce stylelint (#29852)
Stylelint is a css linter: https://stylelint.io/

As part of this change we have added two javascript scripts:

```
pnpm lint:css
pnpm lint:css:fix
```

Look at `.vscode/settings.json.sample` and `.vscode/extensions.json` for
configuration in VSCode.

---------

Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2025-01-20 15:27:42 +00:00
Alan Guo Xiang Tan
e63a804ec9
DEV: Remove unused step in tests workflow (#30838) 2025-01-17 13:39:54 +08:00
David Taylor
0fc2d86259
DEV: Remove pull_request_template (#30709)
We'd like to enable the "default commit message: pull request title and body" option for squash merges. That means we need PR bodies to be clean, and do not want HTML comments like this template to end up becoming part of the commit message body.
2025-01-13 09:27:06 +10:00
David Taylor
ac60ba5954
DEV: Update dependabot commit-message splitting (#30721)
Followup to c6da8e335637cd7be3f258a311509469e452c2ee
2025-01-10 20:58:50 +00:00
David Taylor
c6da8e3356
DEV: Add workflow to replace dependabot PR bodies with plaintext (#30708)
We'd like to enable the "default commit message: pull request title and body" option for squash merges. That doesn't currently work well for dependabot PRs, because the PR body includes rich HTML.

Therefore, this commit introduces a new workflow which replaces any dependabot PR bodies with plaintext content from the commit message. The original rich content will be added in a comment.
2025-01-10 19:12:55 +00:00
Alan Guo Xiang Tan
8d3c86d984
DEV: Run linting workflow on our self hosted runners (#30661)
In 15a7a84d84bb97742263228c7cd043ab6deeae18, I changed the `linting`
workflow to run on `ubuntu-latest` because it is free and helps to free
up our self hosted runners for more important workflow jobs. However,
some devs rely on the `linting` workflow for feedback so we want to
provide this feedback as soon as we can. Therefore, we are putting the
`linting` workflow back on our faster self hosted runners.
2025-01-09 18:22:57 +08:00
Alan Guo Xiang Tan
dc36bed7d3
DEV: Only check for flaky test report on the main branch (#30608)
We don't care about flaky tests on the stable branch for now.
2025-01-07 12:40:01 +08:00
Alan Guo Xiang Tan
f015ea897e
DEV: Move merge job in tests workflow to different runner (#30602)
Use the `ubuntu-latest` runner which is free instead thus freeing up a
self hosted runner
2025-01-07 09:26:35 +08:00
Alan Guo Xiang Tan
78e8316cf0
DEV: Simplify if conditional for flaky test report steps (#30579)
The previous conditionals was just more complex and harder to
understand.
2025-01-06 11:11:24 -05:00
Alan Guo Xiang Tan
15a7a84d84
DEV: Use github hosted runners for simple workflows (#30576)
Our self hosted runners are limited in quantity so we should preserve
them for workflows that actually require the additional resources
instead of tying them up on workflows that do not benefit from the
additional resources.
2025-01-06 14:15:16 +08:00
Alan Guo Xiang Tan
c5a2ac3dec
Revert "DEV: Run one system test process per CPU core (#30484)" (#30539)
This reverts commit a78028e54e5c6eb8ba9f7e7e389d7d713e4ffbf3.

System tests started to become more unstable
2025-01-06 10:35:45 +08:00
Alan Guo Xiang Tan
cf9709ef16
DEV: Run tests workflow using discourse/discourse_test:release image
This commit updates the tests workflow to use the `discourse/discourse_test:release` image. This allows us to drop the some usage of Github actions cache which can be quite slow to fetch from our self hosted runners.
2024-12-28 07:39:31 +08:00
Alan Guo Xiang Tan
a78028e54e
DEV: Run one system test process per CPU core (#30484)
We are running on self hosted runners with more CPU and RAM so we should
be able to run one system test process per CPU core for more speedz.

This may lead to some instability in our system tests but it is hard to say unless we roll this change out. If it does lead to system tests being more unstable, we can easily roll back the change.
2024-12-27 18:43:45 +08:00
Alan Guo Xiang Tan
56ac103547
DEV: Copy gems from Docker image in Github actions tests workflow
On our own self hosted runners, pulling from github actions cache is quite slow and can take up to 20 seconds for the `bundler cache` step. Instead, we will now copy the gems from the `/var/www/discourse/vendor/bundle` folder in the `discourse/discourse_test:release` image which is built daily. This eliminates the need to pull from Github actions cache and also potentially reduces our costs of cache storage.

Note that `discourse/discourse_test:release` is pulled periodically on our self hosted runners so there is no impact on the time it takes to initialize the container.
2024-12-27 08:31:01 +08:00
Jarek Radosz
7b9d484bf4
DEV: Group highlight.js updates (#30426)
(and fix a typo)
2024-12-23 09:09:55 +01:00
David Taylor
a10dcffb73
DEV: Update core lint commands to only affect bundled plugins (#29824)
Non-bundled plugins have their own linting configs/commands, and should not be linted by these package.json commands
2024-11-19 18:56:14 +00:00
Alan Guo Xiang Tan
95fa997e4b
DEV: Upload tests workflow to use actions/upload-artifact@v4 (#29699)
v3 is going to be EOL on Nov 14.
2024-11-11 11:37:53 +00:00
David Taylor
5cc531ed75
DEV: Update jsconfig, add glint config, add basic check in CI (#28667)
Some checks are pending
Licenses / run (push) Waiting to run
Linting / run (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (annotations, core) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (backend, core) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (backend, plugins) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (frontend, plugins) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (frontend, themes) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, chat) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, core) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, plugins) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, themes) (push) Waiting to run
Tests / core frontend (${{ matrix.browser }}) (Chrome) (push) Waiting to run
Tests / core frontend (${{ matrix.browser }}) (Firefox ESR) (push) Waiting to run
Tests / core frontend (${{ matrix.browser }}) (Firefox Evergreen) (push) Waiting to run
This switches us back to the 'unstable' version of Glint, which is 'Volar' under the covers. While it's still a work-in-progress, it already works much better for us than the 'stable' version of Glint.

The CI check makes sure that we don't re-introduce any ts/glint-incompatible changes in future (e.g. object literal property decorators).
2024-10-29 16:55:31 +00:00
David Taylor
92a4b17ad8
DEV: Tweak uppy dependency config (#29436)
- Remove pnpm peerdep exception. We're now up-to-date, and the issue is resolved

- Configure Dependabot to group future updates
2024-10-28 14:18:33 +00:00
Jarek Radosz
97be676b99
DEV: Fix workflow syntax (#29314)
A followup to 417e57d4cef0ac2712b910bb97d396229fc7c50b
2024-10-21 15:53:52 +01:00
David Taylor
417e57d4ce
DEV: Correct flaky env from deb425f3 (#29312)
The env needs to be '1', not 'true'
2024-10-21 14:52:27 +01:00
David Taylor
deb425f3f6
DEV: Use flaky-test-retry in PRs as well (#29311)
The aim of the flaky-tests-rerun system is to reduce the amount of time developers have to spend manually restarting CI jobs. That means that, to get the benefit, we need to run it for PRs as well as on `main`.

Our internal reporting system only looks at the data from runs on `main`, so that it's not polluted by legitimately failing tests in PRs.
2024-10-21 13:02:20 +01:00
David Taylor
d04fd3a8ac
Revert "DEV: Fix github workflow yaml syntax (#29217)" (#29218)
This reverts commit 387f2c52e65ef48ea734fbfdfa34f2e28d3493fb.

Merging fails if there are no artifacts matching the pattern. Reverting while we work out a path forward
2024-10-15 17:23:37 +01:00
David Taylor
387f2c52e6
DEV: Fix github workflow yaml syntax (#29217)
Followup to ec75c442db6c4817d702cfdf8279a22bbfcaea86
2024-10-15 15:47:27 +01:00
David Taylor
ec75c442db
DEV: Update upload-artifact to v4 (#29127)
Co-authored-by: Alan Guo Xiang Tan <gxtan1990@gmail.com>
Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2024-10-15 15:00:36 +01:00
Alan Guo Xiang Tan
f45d5dc268
DEV: Start running discourse-ai tests for stable again. (#29205)
I think the tests works with the new base image now. Will revert if it
doesn't.
2024-10-15 17:37:06 +08:00
Alan Guo Xiang Tan
4d1e66418c
DEV: Skip plugin:pull_compatible_all when running against main branch (#29081)
Plugins are expected to always be compatible against the main `branch`
so we can skip the `plugin:pull_compatible_all rake task.
2024-10-07 14:30:03 +08:00
Alan Guo Xiang Tan
c8bec538c3
DEV: Only enable our self hosted runners on the discourse/discourse repo (#29024)
Our self hosted runners does not work for forked repositories.
2024-09-30 11:18:20 +08:00
Alan Guo Xiang Tan
9a2e6fc890
DEV: Cache minio binaries cause downloading them is slow (#28956) 2024-09-18 10:20:10 +08:00
Alan Guo Xiang Tan
54cf00ba78
DEV: Reduce number of parallel processes for frontend tests (#28936)
Seeing errors like the following which is normally due to us running
too many processes.

```
not ok 292 Firefox - [undefined ms] - error
    ---
        message: >
            Error: Browser timeout exceeded: 10s
            Error while executing test: Acceptance: Uppy Composer Attachment - Multiple Upload Errors: should show a consolidated message for multiple failed uploads
            Stderr:
             *** You are running in headless mode.

            Stdout:
             [GFX1-]: glxtest: libpci missing
            [GFX1-]: glxtest: Unable to open a connection to the X server
            [GFX1-]: No GPUs detected via PCI

            [GFX1-]: RenderCompositorSWGL failed mapping default framebuffer, no dt
```
2024-09-17 08:01:40 +08:00
Alan Guo Xiang Tan
c415b916a2
DEV: Switch to our own hosted runners for tests workflow everywhere (#28926) 2024-09-16 12:03:10 +08:00
Alan Guo Xiang Tan
4377649077
DEV: Only run check-flaky-spec-report when enabled in tests workflow (#28903) 2024-09-13 14:59:49 +08:00
Alan Guo Xiang Tan
9a4f71353d
DEV: Fix incorrect github.ref value in tests workflow (#28902) 2024-09-13 14:24:42 +08:00
Alan Guo Xiang Tan
f6ba5ed4d9
DEV: Use hosted runners on main branch for tests workflow (#28901)
Follow-up to 92f7b3e789e14e772fd6607a7ce3a637124d4a81
2024-09-13 13:43:06 +08:00