-
Notifications
You must be signed in to change notification settings - Fork 0
121 lines (109 loc) · 2.9 KB
/
pipeline.yaml
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
name: Pipeline
on:
pull_request:
types: [opened,synchronize]
schedule:
- cron: '30 10 * * 1,3,5'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
js-lint:
name: JS Lint
permissions:
contents: read
pull-requests: read
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: 18
- name: Install MarkdownLint
run: npm install -g markdownlint-cli
- name: Checking markdown
run: markdownlint .
lint:
name: Lint
permissions:
contents: read
pull-requests: read
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Install Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: .ruby-version
- name: Fasterer
run: bundle exec fasterer
- name: I18n tasks health
run: bundle exec i18n-tasks health
- name: Rails Best Practices
run: bundle exec rails_best_practices
- name: Rubocop
run: bundle exec rubocop --parallel
message-check:
name: Block Autosquash Commits
permissions:
pull-requests: read
runs-on: ubuntu-latest
steps:
- name: Block Autosquash Commits
if: github.event_name == 'pull_request'
uses: xt0rted/block-autosquash-commits-action@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
rspec:
name: Rspec tests
runs-on: ubuntu-latest
timeout-minutes: 5
services:
postgres:
image: postgres:14
env:
POSTGRES_HOST: 127.0.0.1
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: postgres
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Download system package lists
run: sudo apt-get update
- name: Install system dependencies
run: sudo apt-get install -y --no-install-recommends libvips42
shell: bash
- name: Install Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: .ruby-version
- name: Install dependencies
run: |
gem install bundler
bundle install --jobs 4 --retry 3
- name: Setup database
env:
RAILS_ENV: test
run: |
cp config/database.ci.yml config/database.yml
bundle exec rails db:create
bundle exec rails db:schema:load
- name: Run tests
env:
RAILS_ENV: test
run:
bundle exec rspec spec