-
Notifications
You must be signed in to change notification settings - Fork 3
50 lines (39 loc) · 1.17 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
name: "Tests"
on:
push:
branches:
- main
pull_request:
jobs:
test:
strategy:
fail-fast: false
matrix:
rails-version:
- "7.1"
- "6.1"
- "main"
ruby-version:
- "3.2"
- "2.7"
env:
RAILS_ENV: test
RAILS_VERSION: ${{ matrix.rails-version }}
name: ${{ format('Tests rails@{0} ruby@{1}', matrix.rails-version, matrix.ruby-version) }}
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v4"
- uses: "ruby/setup-ruby@v1"
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- name: Build Styles with tailwindcss-rails
run: bin/rails runner 'require "tailwindcss-rails"; `bin/tailwindcss`'
- name: Build Highlight Styles with rouge
run: bin/rails runner 'require "rouge"; `bin/highlights`'
- name: Run tests with Rouge
run: bin/rails test test/
- name: Run tests without Rouge
run: ROUGE_ENABLED=false bin/rails test test/
- name: Fail when generated changes are not checked-in
run: git update-index --refresh && git diff-index --quiet HEAD --