-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This application depends on the Content Schemas. Making the tests reusable allows Publishing API to run the tests when the Content Schemas are updated.
- Loading branch information
1 parent
3d11b52
commit 3842ecd
Showing
2 changed files
with
50 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
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: 'deployed-to-production' | ||
type: string | ||
|
||
jobs: | ||
run-minitest: | ||
name: Run Minitest | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: alphagov/government-frontend | ||
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: Run Minitest | ||
env: | ||
RAILS_ENV: test | ||
GOVUK_CONTENT_SCHEMAS_PATH: vendor/publishing-api/content_schemas | ||
run: bundle exec rake test |