Skip to content

Commit

Permalink
ANW-2011 specs only on java 11, split frontend feature specs into fou…
Browse files Browse the repository at this point in the history
…r groups and run them in parallel
  • Loading branch information
thimios committed Apr 19, 2024
1 parent a401642 commit 9c6e018
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 38 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/accessibility.yml
Expand Up @@ -15,7 +15,7 @@ jobs:

strategy:
matrix:
java: [ 8, 11 ]
java: [ 11 ]

services:
db:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/backend.yml
Expand Up @@ -16,7 +16,7 @@ jobs:

strategy:
matrix:
java: [ 8, 11 ]
java: [ 11 ]

services:
db:
Expand Down
28 changes: 13 additions & 15 deletions .github/workflows/frontend.yml
Expand Up @@ -9,40 +9,38 @@ on:
- 'solr/**'

jobs:
frontend_part_a_and_selenium_java_8:
frontend_part_a:
uses: ./.github/workflows/common-frontend.yml
secrets: inherit
with:
run-cmd: |
./build/run frontend:selenium
./build/run frontend:test:part_a
name: part_a_and_selenium
java-version: 8
./build/run frontend:test -Dpattern="spec/features/[a-c]*_spec.rb"
name: part_a
java-version: 11

frontend_part_b_java_8:
frontend_part_b:
uses: ./.github/workflows/common-frontend.yml
secrets: inherit
with:
run-cmd: |
./build/run frontend:test:part_b
./build/run frontend:test -Dpattern="spec/features/[d-j]*_spec.rb"
name: part_b
java-version: 8
java-version: 11

frontend_part_a_and_selenium_java_11:
frontend_part_c:
uses: ./.github/workflows/common-frontend.yml
secrets: inherit
with:
run-cmd: |
./build/run frontend:selenium
./build/run frontend:test:part_a
name: part_a_and_selenium
./build/run frontend:test -Dpattern="spec/features/[k-r]*_spec.rb"
name: part_c
java-version: 11

frontend_part_b_java_11:
frontend_part_d:
uses: ./.github/workflows/common-frontend.yml
secrets: inherit
with:
run-cmd: |
./build/run frontend:test:part_b
name: part_b
./build/run frontend:test -Dpattern="spec/features/[s-z]*_spec.rb"
name: part_d
java-version: 11
2 changes: 1 addition & 1 deletion .github/workflows/indexer.yml
Expand Up @@ -14,7 +14,7 @@ jobs:

strategy:
matrix:
java: [ 8, 11 ]
java: [ 11 ]

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/public.yml
Expand Up @@ -19,7 +19,7 @@ jobs:
strategy:
fail-fast: false
matrix:
java: [ 8, 11 ]
java: [ 11 ]

services:
db:
Expand Down
20 changes: 1 addition & 19 deletions build/build.xml
Expand Up @@ -675,7 +675,7 @@

<!-- Note: Selenium tests for frontend are not currently included
in coverage reports -->
<target name="frontend:coverage" depends="set-classpath, frontend:clean, frontend:test:part_a, frontend:test:part_b" description="Generate coverage reports for the frontend">
<target name="frontend:coverage" depends="set-classpath, frontend:clean, frontend:test" description="Generate coverage reports for the frontend">
</target>

<target name="frontend:devserver" depends="set-classpath, frontend:clean, frontend:copy:templates" description="Start an instance of the ArchivesSpace frontend development server">
Expand Down Expand Up @@ -723,24 +723,6 @@
</antcall>
</target>

<target name="frontend:test:part_a" depends="set-classpath, frontend:clean, setup-integration" description="Run all spec files starting with [a-h] from the non-Selenium unit test suite (used in CI)">
<property name="tag" value="~db"/>
<antcall target="rspec">
<param name="dir" value="../frontend" />
<param name="pattern" value="spec/*/[a-h]*_spec.rb" />
<param name="tag" value="${tag}" />
</antcall>
</target>

<target name="frontend:test:part_b" depends="set-classpath, frontend:clean, setup-integration" description="Run all spec files starting with [i-z] from the non-Selenium unit test suite (used in CI)">
<property name="tag" value="~db"/>
<antcall target="rspec">
<param name="dir" value="../frontend" />
<param name="pattern" value="spec/*/[i-z]*_spec.rb" />
<param name="tag" value="${tag}" />
</antcall>
</target>

<target name="frontend:test:plugin" depends="set-classpath, setup-integration" description="Run the unit test suite">
<property name="spec" value=""/>
<condition property="example-arg" value="-e &quot;${example}&quot;" else="">
Expand Down

0 comments on commit 9c6e018

Please sign in to comment.