-
Notifications
You must be signed in to change notification settings - Fork 43
62 lines (52 loc) · 1.65 KB
/
minitest.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
name: Run Minitest
on:
workflow_call:
inputs:
ref:
description: 'The branch, tag or SHA to checkout'
required: false
type: string
publishingApiRef:
description: 'The branch, tag or SHA to checkout Publishing API'
required: false
default: main
type: string
jobs:
run-minitest:
name: Run Minitest
runs-on: ubuntu-latest
steps:
- name: Setup MongoDB
uses: alphagov/govuk-infrastructure/.github/actions/setup-mongodb@main
with:
version: 3.6
- name: Setup Redis
uses: alphagov/govuk-infrastructure/.github/actions/setup-redis@main
- name: Checkout repository
uses: actions/checkout@v3
with:
repository: alphagov/publisher
ref: ${{ inputs.ref || github.ref }}
- name: Checkout Publishing API (for Content Schemas)
uses: actions/checkout@v3
with:
repository: alphagov/publishing-api
ref: ${{ inputs.publishingApiRef }}
path: vendor/publishing-api
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Setup Node
uses: alphagov/govuk-infrastructure/.github/actions/setup-node@main
- name: Precompile assets
uses: alphagov/govuk-infrastructure/.github/actions/precompile-rails-assets@main
- name: Initialize database
env:
RAILS_ENV: test
run: bundle exec rails db:setup
- name: Run Minitest
env:
RAILS_ENV: test
GOVUK_CONTENT_SCHEMAS_PATH: vendor/publishing-api/content_schemas
run: bundle exec rake test