-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (59 loc) · 1.73 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
54
55
56
57
58
59
name: tests
run-name: ${{ github.actor }} is running the tests
on: [push]
jobs:
run-tests:
name: Run ${{ matrix.command }} tests
runs-on: ubuntu-latest
strategy:
matrix:
command: [rspec, spinach]
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: s3sam3
ports: ["5432:5432"]
options: >-
--health-cmd pg_isready
--health-interval 10ms
--health-timeout 500ms
--health-retries 15
env:
NAME_PN_POSTGRESQL_SERVICE_HOST: localhost
POSTGRES_PASSWORD: s3sam3
CI: true
JWT_SECRET: ecc9bd09c69b20112918a7eb50b5a09d9e97cb9f51ab417208d3f93939c013cfd9cf3de9003b6a688592141c475aeeb660036b43d5e675e96583e389b234ce59
steps:
- uses: actions/checkout@v4
- name: Install libvips
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: libvips-dev
version: 1.0
- name: Install Ruby & gem dependencies
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3.0'
bundler-cache: true
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: '22.x'
cache: 'yarn'
- name: Install yarn dependencies
run: yarn install --frozen-lockfile
- name: Set up database
run: bin/rails db:setup
- name: Build assets
run: bin/rails assets:precompile
- name: Run ${{ matrix.command }}
run: bin/${{ matrix.command }}
- name: Upload screenshots
uses: actions/upload-artifact@v4
if: failure()
with:
name: capybara-screenshots
path: tmp/capybara
if-no-files-found: ignore
retention-days: 4