Compare commits
3 Commits
4b08dd3f06
...
e517eb53a7
Author | SHA1 | Date | |
---|---|---|---|
![]() |
e517eb53a7 | ||
26934e75cd | |||
ee46e0fc9c |
34
.github/workflows/tests.yml
vendored
Normal file
34
.github/workflows/tests.yml
vendored
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
name: Run unit tests
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
pull_request:
|
||||||
|
jobs:
|
||||||
|
unit_tests:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
services:
|
||||||
|
postgres:
|
||||||
|
image: postgres
|
||||||
|
env:
|
||||||
|
POSTGRES_USER: postgres
|
||||||
|
POSTGRES_PASSWORD: postgres
|
||||||
|
options: >-
|
||||||
|
--health-cmd pg_isready
|
||||||
|
--health-interval 10s
|
||||||
|
--health-timeout 5s
|
||||||
|
--health-retries 5
|
||||||
|
ports:
|
||||||
|
- 5432
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- uses: ruby/setup-ruby@v1
|
||||||
|
- run: bundle install
|
||||||
|
- run: |
|
||||||
|
bundle exec rake db:create db:schema:load
|
||||||
|
bundle exec rspec
|
||||||
|
env:
|
||||||
|
RAILS_ENV: test
|
||||||
|
DATABASE_URL: postgres://postgres:postgres@postgres:5432/postgres
|
2
Gemfile
2
Gemfile
@ -1,6 +1,6 @@
|
|||||||
source "https://rubygems.org"
|
source "https://rubygems.org"
|
||||||
|
|
||||||
ruby "3.2.0"
|
ruby "3.3.4"
|
||||||
|
|
||||||
# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
|
# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
|
||||||
gem "rails", "~> 7.1.3", ">= 7.1.3.2"
|
gem "rails", "~> 7.1.3", ">= 7.1.3.2"
|
||||||
|
@ -279,7 +279,7 @@ DEPENDENCIES
|
|||||||
web-console
|
web-console
|
||||||
|
|
||||||
RUBY VERSION
|
RUBY VERSION
|
||||||
ruby 3.2.0p0
|
ruby 3.3.4p94
|
||||||
|
|
||||||
BUNDLED WITH
|
BUNDLED WITH
|
||||||
2.5.6
|
2.5.6
|
||||||
|
Loading…
x
Reference in New Issue
Block a user