-
Notifications
You must be signed in to change notification settings - Fork 142
73 lines (65 loc) · 1.77 KB
/
ci.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: CI
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
permissions:
contents: read
jobs:
test:
name: Ruby specs
runs-on: ubuntu-latest
env:
RAILS_ENV: test
services:
db:
image: postgis/postgis:16-3.4-alpine
ports: ['5432:5432']
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
redis:
image: redis
ports: ['6379:6379']
options: --entrypoint redis-server
steps:
- name: Install GEOS
run: |
sudo apt-get update
sudo apt-get -yq --no-install-suggests --no-install-recommends install libgeos-dev
- name: Set up Actions
uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3.6'
bundler-cache: true
- uses: pnpm/action-setup@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'
- name: Install node dependencies
run: pnpm install
- name: Set up Database
run: bundle exec rails db:prepare
- name: Force reinstall of RGeo with native extensions # Ref: diowa/icare#1783
run: |
bundle show rgeo
rm -rf `bundle show rgeo`
bundle
- name: Check GEOS support
run: bundle exec rails rgeo_supports_geos
- name: Run specs
run: bundle exec rake spec
- name: Coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.github_token }}
path-to-lcov: 'coverage/lcov.info'