-
Notifications
You must be signed in to change notification settings - Fork 5
133 lines (120 loc) · 3.38 KB
/
build.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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
---
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
linters:
name: Linters
runs-on: ubuntu-24.04
strategy:
matrix:
task:
- brakeman
- rubocop
- biome
- erblint
- language_versions
fail-fast: false
env:
BUNDLE_WITHOUT: development
PUPPETEER_SKIP_DOWNLOAD: true
RAILS_ENV: test
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Ruby and install gems
uses: ruby/setup-ruby@v1
with:
ruby-version: .ruby-version
bundler-cache: true
- name: Install Node
uses: actions/setup-node@v4
with:
node-version-file: .node-version
- run: yarn install
- name: Lint with ${{ matrix.task }}
run: |
bundle exec rake ${{ matrix.task }}
specs:
uses: ./.github/workflows/testing.yml
strategy:
matrix:
specs:
- { group: "models" }
- { group: "requests", want_pdf: true }
- {
group: "system: rack_test",
directories: "system",
additional_spec_opts: "--tag '~capybara' --tag '~js'",
want_pdf: true,
}
- {
group: "system: capybara",
directories: "system",
additional_spec_opts: "--tag 'capybara' --tag 'js'",
want_pdf: true,
}
- { group: "components", want_pdf: true }
- {
group: "other",
directories: "{controllers,form_models,helpers,presenters,mailer,jobs,services,translations}",
}
- { group: "bops_admin", module: "engines" }
- { group: "bops_api", module: "engines" }
- { group: "bops_config", module: "engines" }
- { group: "bops_core", module: "engines" }
- { group: "bops_uploads", module: "engines" }
- { group: "bops_consultees", module: "engines", want_pdf: true }
fail-fast: false
with:
name: "${{matrix.specs.group}}"
include: "${{matrix.specs.module || 'spec'}}/${{matrix.specs.directories || matrix.specs.group}}/${{matrix.specs.pattern || '**/*_spec.rb'}}"
want-pdf: "${{ !!matrix.specs.want_pdf }}"
additional_spec_opts: "${{ matrix.specs.additional_spec_opts }}"
secrets: inherit
cucumber:
uses: ./.github/workflows/testing.yml
with:
name: "all"
test-runner: "cucumber"
want-pdf: true
secrets: inherit
docker-dnsmasq:
uses: ./.github/workflows/testing.yml
with:
name: "all"
test-runner: "docker"
dockerfile: docker/dnsmasq/Dockerfile
context: docker/dnsmasq
secrets: inherit
docker-postgis:
uses: ./.github/workflows/testing.yml
with:
name: "all"
test-runner: "docker"
dockerfile: docker/postgis/Dockerfile
context: docker/postgis
secrets: inherit
docker-ruby:
uses: ./.github/workflows/testing.yml
with:
name: "all"
test-runner: "docker"
dockerfile: docker/ruby/Dockerfile
context: docker/ruby
secrets: inherit
docker-prod:
uses: ./.github/workflows/testing.yml
with:
name: "all"
test-runner: "docker"
dockerfile: Dockerfile.production
secrets: inherit