-
Notifications
You must be signed in to change notification settings - Fork 194
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This separates out the two runs done by integration tests: one with preview_design_system permissions and one without. Each is run in a separate workflow. I opted to make separate worksflows to make it easy to delete the preview_design_system workflow once fully ported over to the design system.
- Loading branch information
Jonathan Young
committed
Oct 12, 2023
1 parent
3d27a9c
commit d1610ab
Showing
2 changed files
with
60 additions
and
0 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,56 @@ | ||
name: Run integration tests | ||
|
||
on: workflow_call | ||
|
||
jobs: | ||
run-parallel-integration-tests: | ||
name: Run integration tests | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
node_rake_task: ["cucumber:ok", "cucumber:preview_design_system"] | ||
steps: | ||
- name: Setup MySQL | ||
id: setup-mysql | ||
uses: alphagov/govuk-infrastructure/.github/actions/setup-mysql@main | ||
|
||
- name: Setup Redis | ||
uses: alphagov/govuk-infrastructure/.github/actions/setup-redis@main | ||
|
||
- name: Install additional system dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y --no-install-recommends ghostscript | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- 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 | ||
TEST_DATABASE_URL: ${{ steps.setup-mysql.outputs.db-url }} | ||
run: bundle exec rails db:setup | ||
|
||
- name: Run cucumber | ||
env: | ||
RAILS_ENV: test | ||
TEST_DATABASE_URL: ${{ steps.setup-mysql.outputs.db-url }} | ||
run: bundle exec rails ${{ matrix.node_rake_task }} | ||
|
||
- name: Upload screenshots | ||
uses: actions/upload-artifact@v3 | ||
if: failure() | ||
with: | ||
name: capybara-screenshots | ||
path: tmp/capybara/capybara-*.png |