-
-
Notifications
You must be signed in to change notification settings - Fork 35
100 lines (96 loc) · 2.99 KB
/
test.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: Build
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
jobs:
rspec:
if: ${{ !contains(github.event.head_commit.message, '[ci skip tests]') }}
runs-on: ubuntu-latest
env:
BUNDLE_JOBS: 4
BUNDLE_RETRY: 3
BUNDLE_FORCE_RUBY_PLATFORM: 1
CI: true
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
COVERAGE: "true"
COVERALLS_REPO_TOKEN: ${{ secrets.github_token }}
services:
redis:
image: redis:7.0-alpine
ports: ["6379:6379"]
options: --health-cmd="redis-cli ping" --health-interval 1s --health-timeout 3s --health-retries 30
strategy:
fail-fast: false
matrix:
ruby: ["3.3"]
gemfile: ["rails7", "rails8"]
next: ["0", "1"]
include:
- ruby: "3.2"
gemfile: "anycablemaster"
next: "0"
steps:
- uses: actions/checkout@v4
- name: Install system deps
run: |
sudo apt-get update
sudo apt-get install libsqlite3-dev
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Install Coveralls reporter
run: |
curl -L https://github.com/coverallsapp/coverage-reporter/releases/latest/download/coveralls-linux.tar.gz | tar zxv
- name: Run RSpec
continue-on-error: ${{ matrix.allow_failure }}
run: |
bundle exec rake spec
./coveralls -p --job-flag=ruby-${{ matrix.ruby }}-${{ matrix.gemfile }}
- name: Run compatibility specs
continue-on-error: ${{ matrix.allow_failure }}
run: |
bundle exec rake spec:compatibility
./coveralls -p --job-flag=compatibility-${{ matrix.ruby }}-${{ matrix.gemfile }}
anyt:
if: ${{ !contains(github.event.head_commit.message, '[ci skip tests]') }}
runs-on: ubuntu-latest
env:
BUNDLE_JOBS: 4
BUNDLE_RETRY: 3
BUNDLE_FORCE_RUBY_PLATFORM: 1
CI: true
BUNDLE_GEMFILE: "gemfiles/anyt.gemfile"
services:
redis:
image: redis:7.0-alpine
ports: ["6379:6379"]
options: --health-cmd="redis-cli ping" --health-interval 1s --health-timeout 3s --health-retries 30
steps:
- uses: actions/checkout@v4
- name: Install system deps
run: |
sudo apt-get update
sudo apt-get install libsqlite3-dev
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3
bundler-cache: true
- name: Run conformance tests with Anyt
run: |
bundle exec anyt --self-check --require=etc/anyt/*.rb
coverage:
needs: rspec
runs-on: ubuntu-latest
env:
COVERALLS_REPO_TOKEN: ${{ secrets.github_token }}
steps:
- name: Install Coveralls reporter
run: |
curl -L https://github.com/coverallsapp/coverage-reporter/releases/latest/download/coveralls-linux.tar.gz | tar zxv
- name: Finilize Coveralls build
run: |
./coveralls -d