Skip to content

Commit 6fffdda

Browse files
authored
Merge pull request #5 from altmetric/upgrade
Modernize the development environment
2 parents af9c293 + aa96b9d commit 6fffdda

14 files changed

Lines changed: 93 additions & 14 deletions

.github/workflows/ci.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: CI for reliable-queue-rb
2+
3+
on:
4+
push:
5+
branches:
6+
- '**'
7+
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
12+
strategy:
13+
matrix:
14+
ruby-version: [2.7, 3.0, 3.1, 3.2, 3.3]
15+
16+
services:
17+
redis:
18+
image: redis:latest
19+
ports:
20+
- 6379:6379
21+
22+
steps:
23+
- name: Checkout code
24+
uses: actions/checkout@v4
25+
26+
- name: Set up Ruby
27+
uses: ruby/setup-ruby@v1
28+
with:
29+
ruby-version: ${{ matrix.ruby-version }}
30+
bundler-cache: true
31+
32+
- name: Install dependencies
33+
run: bundle install
34+
35+
- name: Run tests
36+
run: bundle exec rake
37+

.rubocop.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
inherit_gem:
2+
house_style: ruby/rubocop.yml

.travis.yml

Lines changed: 0 additions & 7 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@
33
All notable changes to this project will be documented in this file. This
44
project adheres to [Semantic Versioning](http://semver.org/).
55

6+
## UNRELEASED - 2024-10-18
7+
8+
### Changed
9+
10+
- Modernise dev dependencies
11+
- Replace Travis CI with GitHub Actions
12+
- Add house_style and apply the corrections
13+
- Change the supporting Ruby versions to 2.7 onwards
14+
615
## [0.4.0] - 2023-11-10
716

817
### Changed

Dockerfile.dev

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
FROM ruby:2.7.8
2+
3+
WORKDIR /app
4+
COPY . /app
5+
6+
RUN gem install bundler -v 2.4.22
7+
RUN bundle install
8+
9+
CMD ["docker/entrypoint.sh"]

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2020-2021 Altmetric LLP
3+
Copyright (c) 2020-2024 Altmetric LLP
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,6 @@ Bug reports and pull requests are welcome on GitHub at <https://github.com/altme
5050

5151
## License
5252

53-
Copyright © 2020-2021 Altmetric LLP
53+
Copyright © 2020-2024 Altmetric LLP
5454

5555
Distributed under the [MIT License](http://opensource.org/licenses/MIT).

Rakefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,11 @@ require 'bundler/gem_tasks'
22
require 'rspec/core/rake_task'
33

44
RSpec::Core::RakeTask.new(:spec)
5-
65
task :default => :spec
6+
7+
begin
8+
require 'rubocop/rake_task'
9+
RuboCop::RakeTask.new
10+
Rake::Task[:default].enhance([:rubocop])
11+
rescue LoadError
12+
end

docker-compose.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
services:
2+
app:
3+
build:
4+
context: .
5+
dockerfile: Dockerfile.dev
6+
stdin_open: true
7+
tty: true
8+
volumes:
9+
- .:/app
10+
environment:
11+
REDIS_HOST: redis
12+
REDIS_PORT: 6379
13+
depends_on:
14+
- redis
15+
redis:
16+
image: "redis:latest"
17+
ports:
18+
- "6379:6379"

docker/entrypoint.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env bash
2+
3+
# Start an interactive shell to keep the container running
4+
exec bash

0 commit comments

Comments
 (0)