-
Notifications
You must be signed in to change notification settings - Fork 14
53 lines (47 loc) · 1.21 KB
/
tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Points
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build-rails-current:
runs-on: ubuntu-latest
env:
DATABASE_URL: "postgres://postgres:postgres@localhost/points-test"
services:
postgres:
image: postgres:11.6-alpine
ports:
- 5432:5432
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- name: Checkout Code
uses: actions/checkout@v1
- name: Install PostgreSQL 11 client
run: |
sudo apt-get -yqq install libpq-dev
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2.2"
bundler-cache: true
- name: Build App
run: |
bundle exec rails db:setup
- name: Run RSpec
run: |
bundle exec rspec
- uses: actions/upload-artifact@v4
if: failure()
with:
name: Screenshots and logs
path: |
tmp/capybara
log