Commit Graph

15 Commits

Author SHA1 Message Date
Javi Martín
1c68ad3a2a Use a maintained PostgreSQL version in Docker
We're using version 13 because it's the one included in Debian Bullseye,
which is the operating system we currently use in our Dockerfile.

For consistency, we're using the same version in GitHub Actions.

Note this image requires setting a password. Otherwise we get an error:

> Database is uninitialized and superuser password is not specified.
> You must specify POSTGRES_PASSWORD to a non-empty value for the
> superuser. For example, "-e POSTGRES_PASSWORD=password" on
> "docker run".

Since now we're setting a password in the postgres service, we also need
to provide the `PGPASSWORD` environment variable (or to specify the
password in the `database.yml` file, which we do for GitLab since it
uses a separate database configuration file). Otherwise we get an error:

```
PG::ConnectionBad: connection to server at "::1", port 5432 failed:
fe_sendauth: no password supplied (PG::ConnectionBad)
```
2024-09-18 15:44:50 +02:00
Javi Martín
497c542082 Upgrade Ruby to version 3.2.5
So get the latest fixes in the 3.2.x series.

We're also updating the parser gem so we don't get any warnings.
2024-08-19 16:04:38 +02:00
Javi Martín
118a4dde89 Upgrade Ruby to version 3.2.4
As usual, we're upgrading the parser gem so we don't get warnings about
the Ruby version when running a rails console.
2024-06-17 15:18:40 +02:00
Javi Martín
0902fde19d Install Node packages before compiling assets in Gitlab CI
The asset compilation was failing because it needs the packages that are
installed with `npm clean-install`.

We're now installing the Node packages after installing the gems, like
we do in Github Actions. For this, we need to install the `npm` package.
2024-04-11 21:35:10 +02:00
Javi Martín
7840c98660 Upgrade Ruby to version 3.2.3
As usual, we're updating the bundler version in our Gemfile.lock so it
uses the one included in Ruby 3.2.3, and we're also updating the
`parser` gem so it supports this version.
2024-04-11 17:59:40 +02:00
Javi Martín
ad166fba4c Setup NPM with an empty package.json file
Note that, even if we're excluding the `node_modules/` folder from
version control, we aren't adding it to Capistrano's shared folders
because, when `node_modules` is a symbolic link, NPM removes it when
running `npm install`.
2023-10-17 13:12:20 +02:00
Javi Martín
e74eff217b Upgrade Ruby to version 3.1.4
Note we updated the `mail` gem in commit 103742847, which is necesary
for Ruby 3.1 because it adds the net-smtp dependency. The net-smtp
library was removed from Ruby in Ruby 3.1, and if we don't include it,
we get an error:

```
cannot load such file -- net/smtp (LoadError)
```

We're also updating the Bundler version in the Gemfile.lock so it's the
one included in Ruby 3.1. Without updating it, we get a warning:

```
Calling `DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)'
has been deprecated. Please call `DidYouMean.correct_error(error_nam e,
spell_checker)' instead.
```

Finally, in order to make Capistrano work, we need to add a couple more
changes:

* Make the net-ssh gem compatible with SSL 3.0; done in commit b2eec088b
* Explicitly allow aliases in the `deploy-secrets.yml` file because
  Psych 4.x (included in Ruby 3.1) doesn't load aliases without this
  option
2023-09-12 15:17:17 +02:00
Javi Martín
6c8445e3d7 Upgrade Ruby to version 3.0.6
Note the structure of the Gemfile changes slightly because Ruby 3.0
includes a new version of the Bundler gem.
2023-04-13 16:41:07 +02:00
Javi Martín
47a5840c70 Upgrade Ruby to version 2.7.7
So get the latest fixes in the 2.7.x series.

We're also updating the parser gem so we don't get any warnings.
2022-12-21 15:57:02 +01:00
Javi Martín
8ed8cc8b93 Use Coveralls Github Action to send test reports
Coveralls stopped working back in July when we reached build number 3790
because back when we used Travis we created builds from numbers 3791 to
35700.

After trying to change the numbers in several ways, all of them
resulting in a "No build matching CI build number" message, we're trying
the Github Action provided by Coveralls instead. In order to make it
work, we need to add the `simplecov-lcov` gem and generate the report at
`coverage/lcov.info`. Note that, for some reason, `simplecov-lcov`
doesn't seem to depend on `simplecov` and we need `simplecov` 0.18 or
later, so we're manually adding this dependency as well.
2022-11-29 14:51:22 +01:00
Javi Martín
107c856aea Upgrade Ruby to version 2.7.6
So get the latest fixes in the 2.7.x series.

We're also updating the parser gem so we don't get any warnings.
2022-06-03 20:03:39 +02:00
Javi Martín
f2330bee2b Upgrade Ruby to version 2.7.4
Note this version includes Bundler 2, so we can finally upgrade.
2021-09-03 12:12:38 +02:00
Javi Martín
9222ea0cf6 Upgrade Ruby to version 2.6.8
So get the latest security fixes in the 2.6.x series and we can update
the parser gem without getting any warnings.
2021-08-09 01:14:08 +02:00
Javi Martín
a2113ae003 Upgrade Ruby to version 2.6.7
So get the latest security fixes in the 2.6.x series.
2021-05-20 16:43:56 +02:00
Javi Martín
de746b4004 Add experimental Gitlab CI integration
Based on the configuration recommended by Knapsack PRO [1] and Pronto
[2].

So far there are a few issues:

* Bundled gems don't seem to be cached
* The Ruby version can't be read from .ruby-version and needs to be set
  manually
* Tests are slower than when run on Github Actions or Travis CI
* There seem to be many flaky tests, maybe because tests are slower
  (this might actually help us fixing flaky bugs or performance
  bottlenecks)

An advantage of Gitlab CI is we can access the screenshots taken when a
system test fails.

[1] https://docs.knapsackpro.com/2019/how-to-run-parallel-jobs-for-rspec-tests-on-gitlab-ci-pipeline-and-speed-up-ruby-javascript-testing
[2] https://github.com/prontolabs/pronto/#gitlab-integration
2021-03-23 13:02:41 +01:00