Commit Graph

110 Commits

Author SHA1 Message Date
Rafael Mendonça França 5c933a3d82
Merge pull request #51791 from duduribeiro/add-name-to-devcontainer-compose
Add name to DevContainer compose file
2024-05-13 14:10:47 -04:00
Cadu Ribeiro f63d344ce9 Add name to DevContainer compose file
Currently when you generate a project the compose.yaml generated
file does not include the top-level name property. Not having this
top-level name property makes all containers / volumes started by
devcontainer to be prepended with the folder name, which is
`devcontainer` in the case of the .devcontainer/compose.yml` file.

This is ok if you run only one project with devcontainer but starts
to get problem if you run multiple projects. If you have one project
that runs on postgresql 15 and a new one that runs on postgresql 16 it
will fail to boot the postgresql container because both devcontainers is
using the same volume: `devcontainer_postgres-data`.

This commit fixes this by setting the top-lavel name property with
the project name, which will make the containers and volumes to be
prepended with the project name and not with `devcontainer`.
2024-05-13 14:26:46 -03:00
Rafael Mendonça França 37fd0e7fe4
Development of Rails 8.0 starts now
🎉
2024-05-13 16:45:20 +00:00
Rafael Mendonça França 77909f38be
Do not trigger devcontainer tests on pull requests
We need to review the code before executing this workflow, so only trigger when someone merge to this repository.
2024-05-12 22:12:09 -04:00
Akhil G Krishnan 4d35717844 Upgrade the docker-login and checkout action versions 2024-04-26 23:08:53 +05:30
Rafael Mendonça França f7f8e1496f
Remove rubocop and lint workflows
They were moved to the buildkite pipeline.

See https://github.com/rails/buildkite-config/pull/97.
2024-04-15 21:27:07 +00:00
Rafael Mendonça França e7eb70c713
Run devcontainer smoke tests in one single job
GitHub Actions spams the commit status with one for each job.

We want to keep the number of statuses to a minimum, so we can see the
main buildkite status, so we should run all the tests in a single job.
2024-04-15 18:55:24 +00:00
Andrew Novoselac 9928479d7c Fix devcontainer smoke test for forked repos
When we run the smoke test on main, we push the devcontainer images to ghcr to be used as a cache for future workflow runs. This causes an error on forks because they don't have permission to push (which is good). So, let's set the step to never push if the repo is a fork. The github context doesn't have a way of checking if the repo is a fork, so I check the repo owner instead, but that's ok since it's the repo owner (rails) who has permissions to push the package.
2024-04-15 10:50:29 -04:00
Andrew Novoselac 6fb1772fe2 Create a workflow for testing generated devcontainer setup
This workflow tests the generated devcontainer for new rails apps by:

- Generating a new app with the --dev flag
- Initializing the dev container that is generated
- Generating a model scaffold and running the migrations
- Running the tests

It tests each of the four supported database configurations.
2024-04-12 13:04:04 -04:00
Aditya Pandit bf48b1515c Updated the pull request template, grammatical and general wordings 2024-03-12 22:17:17 +05:30
Akhil G Krishnan 6713a41111 Remove python setup from CI 2024-01-14 10:31:15 +05:30
Rafael Mendonça França d8cb2e94f1
Remove the Gemfile.lock for good now 2024-01-09 19:56:58 +00:00
Rafael Mendonça França 18501f7c6c
Don't use the Gemfile lock on CI steps
This file is only for development.
2024-01-09 19:54:02 +00:00
Akhil G Krishnan 7812ab1138 Remove codespell step from CI
removed codespell.txt
2024-01-09 09:27:13 +05:30
Akhil G Krishnan b41740259f Use Ruby 3.3 for github workflows 2024-01-07 11:18:30 +05:30
David Heinemeier Hansson 8397eb24da
Remove rollup and test machinery for rails-ujs (#50535)
This leaves only the final compiled targets in place.
2024-01-02 16:49:36 +01:00
Jean Boussier 6b446bee63 Remove SQLite production warning but leave production config disabled
There are valid use cases for running SQLite in production, however it must be done
with care, so instead of a warning most users won't see anyway, it's preferable to
leave the configuration commented out to force them to think about having the database
on a persistent volume etc.

Co-Authored-By: Jacopo Beschi <beschi.jacopo@gmail.com>
2023-12-27 23:32:18 +01:00
zzak 32fa741087
Ensure all GH Actions set to read-only contents
Since a GH token is required for the action-discord notify action to fetch the commit message, otherwise it would make unauthenticated requests leading to rate limiting. This shouldn't impact the result of a workflow, but it's annoying.

The permissions for this token can vary based on the repository's settings. So to ensure we don't accidentally get a token with write access or something, we should use restrictive permissions per workflow, like the other workflows in this project.

See: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token
2023-11-30 06:02:52 +09:00
John Bampton fdccd425a6 Bump actions/checkout to v4 2023-10-24 14:43:17 +10:00
Yasuo Honda 3116dc85de Update stale issue comment to mention 7-1-stable
https://guides.rubyonrails.org/maintenance_policy.html#bug-fixes
> 3 Bug Fixes
...
> Currently included series: 7.1.Z.
2023-10-09 16:20:04 +09:00
zzak 5c2a112d37
Import rails-bin to internal tools/
Co-authored-by: zzak <zzakscott@gmail.com>
2023-09-13 01:57:16 +00:00
Lorenzo Zabot b5a5c191f2 Bump github actions/checkout to v4 2023-09-06 15:05:32 +02:00
zzak 9218ef7c65
Use zzak/action-discord@v8
* Removed 'fixed/still failing' modes
* Only runs when failure() step
* Include GITHUB_TOKEN to prevent rate-limits
* Need to reset BUNDLE_ONLY on rubocop job
2023-08-23 10:09:57 +09:00
zzak b9bdbce61b
Refactor actions to make fewer status checks 2023-08-22 12:13:05 +09:00
Jean Boussier ca781c84cd Do not codespell yarn.lock 2023-08-17 12:48:20 +02:00
zzak 4bcc7bc951
Fix duplicate Gemfile entry warning
Your Gemfile lists the gem rake (>= 13) more than once.
You should probably keep only one of them.
Remove any duplicate entries and specify the gem only once.
While it's not a problem now, it could cause errors if you change the version of one of them later.
2023-04-05 11:15:55 +09:00
zzak f43f4e6372
Notify job should not affect workflow result 2023-04-03 10:54:00 +09:00
Rafael Mendonça França 4d171a4bde
Merge pull request #47779 from zzak/mdl
Introduce markdownlint for guides
2023-03-29 15:33:41 -04:00
Sarah Ridge 48b8285f4d
Update Action Text's Trix dependency (2.0.4) 2023-03-28 12:23:01 -04:00
zzak c3f2b545f8
Introduce markdownlint for guides
This is a follow up to rails#47186, this time for all markdown content.

[markdownlint](https://github.com/markdownlint/markdownlint) is an excellent tool, and I've found it very useful for finding issues in the guides.

Many of the rules are common style issues I'm correcting on PRs, so it will be nice to have that automated.

We should also be able to use the same config with our editors, so that errors show up in real-time 🙏 and will update the contributing docs once this gets merged with how to debug and use mdl appropriately.
2023-03-27 12:14:18 +09:00
zzak e4181b33ae
Notify discord when workflows fail on main 2023-03-12 08:06:42 +09:00
Jean Boussier b31e549cbd Trigger the Dockerfile test on pull_request event as well
x
2023-03-04 16:58:37 +01:00
zzak 874103b73c
CI workflow to build and test --dev image 2023-03-03 19:16:36 +09:00
Hartley McGuire 630b1ff128
Add linter for framework defaults and Rails config
This linter parses the Rails::Application::Configuration file and
ensures that
- all configurations are listed alphabetically in Configuring guide
- all framework defaults are listed alphabetically in Configuring guide
- all framework defaults are included in the new_framework_defaults_x_x
  template
2023-02-12 14:49:02 -05:00
Yasuo Honda 91b02d832d Use Ruby 3.2 for RuboCop workflow
Also bumped rubocop, rubocop-minitest, rubocop-performance and rubocop-rails
because RuboCop workflow uses Gemfile.lock unlike Rails CI that removes it.
2023-01-05 10:43:08 +09:00
Yasuo Honda cd223db814 Use `BUNDLE_ONLY: rubocop` suported since Bundler 2.3.19
Bundler 2.3.19 can install gems of the specific group now.

Refer to
https://github.com/rubygems/rubygems/blob/master/bundler/CHANGELOG.md#2319-july-27-2022
https://github.com/rubygems/rubygems/pull/5759
https://github.com/rails/rails/pull/38836
2022-12-24 10:07:49 +09:00
Alex Ghiculescu 2d239ad994 Clarify CI requirement in PR template [ci skip]
You can't check if "CI is passing" until you create a PR, because for most people Buildkite will only run the build when a PR is created (It will run on branch push only if you push to a branch of the `rails/rails` repo, which only people with write access can do.). So we shouldn't tell people to wait for CI to pass before submitting a PR.

This PR just tweaks the CI template to explain this in a comment so that people know to check back once CI has actually run.
2022-12-02 11:04:05 -06:00
Sasha Stadnik 29a2a684c5 fix typo in pull request template [ci-skip] 2022-10-25 21:34:03 +03:00
Alex Ghiculescu cccbc092ae
PR template: note about auto-closing issue
I've noticed a few PRs made since the latest template update, that have said things like "this PR was created because of #ISSUE" or things along those lines. It seems like people are reading the template and following its advice! But Github requires a specific syntax to auto-close an issue, so we may as well encourage people to use that to save everyone a bit of time. So in this PR I've added a comment to the template explaining that.
2022-10-22 09:23:29 -05:00
eileencodes bb31faba60
Make PR template less onerous
I think no one is reading this because I've seen an increase in draft
PRs. To fix that I've moved the draft statement to the top. I also think
the number of check boxes is a lot and isn't resulting in better PRs
because the length means they are not being read. I removed ones that I
think are repetitive or unhelpful. I wish I could A/B test this...
2022-10-19 10:25:25 -04:00
Rafael Mendonça França d7c937b7ff
Ignore qunit for spelling check
Only use one tool to check spelling.
2022-09-20 21:13:39 +00:00
Eileen M. Uchitelle f9030fe0c6
Merge pull request #45495 from okuramasafumi/rewrite-pull-request-template
Update Pull Request Template [ci-skip]
2022-09-08 10:35:38 -04:00
Hartley McGuire dea0ad3473
Update changelog linter
Two things were changed:
- line number are added to errors so its easier to find them
- blank lines with trailing whitespace now correctly show 1 error
  (trailing whitespace) instead of 2 (trailing whitespace + wrong
  indentation)
2022-08-30 19:30:46 -04:00
John Hawthorn 60c0a3de29 Install specific version of codespell
As the codespell dictionary changes between versions, we should declare
explicitly the version we are ready for so that this CI doesn't break
every time there is a new version.

Ideally this would be upgraded periodically to catch new errors, but I
don't think the need is urgent enough for us to fail CI on PRs.
2022-08-18 12:58:50 -07:00
Hartley McGuire a4770968ef
Add linter for CHANGELOG formatting
There have been a number of recent commits introducing incorrectly
formatted CHANGELOG entries:
- 9f0b8eb was missing an author
- 936a862 had trailing whitespace
- 238432d had wrong number of leading whitespace
- 51852d2 had wrong number of leading whitespace in the header

To prevent these inconsistencies from happening in the future, I wrote a
small linter for CHANGELOG files that catches all of the above errors.
2022-07-27 19:59:56 -04:00
OKURA Masafumi 69d68a371f Update Pull Request Template
The major change is to add checklist so that it's easier to be read
than comments.
Also, `Summary` is not clear about what should be written, so here
it's changed to `Motivation` and `Detail`.
Finally, it clearly says they can discard this template if they need to.
2022-07-14 22:44:24 +09:00
eileencodes 591c8842cc
Bump ruby version for Rubocop
We should run rubocop using the latest Ruby version.
2022-06-23 08:25:43 -04:00
Varun Sharma 80f7dcfdc2 ci: add GitHub token permissions 2022-05-21 19:23:41 -07:00
Rafael Mendonça França acf4816994
Stop autoclosing of PRs
While the idea of cleaning up the the PRs list by nudging reviewers
with the stale message and closing PRs that didn't got a review in time
cloud work for the maintainers, in practice it discourages contributors
to submit contributions.

Keeping PRs open and not providing feedback also doesn't help with
contributors motivation, so while I'm disabling this feature of the bot
we still need to come up with a process that will help us to keep
the number of PRs in check, but celebrate the work contributors already
did instead of ignoring it, or dismissing in the form of a "stale"
alerts, and automatically closing PRs.
2022-05-11 16:42:57 +00:00
Jean Boussier ac8fd700bb
Merge pull request #44985 from jonathanhefner/client9-misspell-immutable-url
Use immutable URL for arbitrary code
2022-05-09 10:01:41 +02:00