Skip to content

Commit

Permalink
split tests to improve build speed
Browse files Browse the repository at this point in the history
- Run tests that only involve ckanext-data-qld in parallel with tests that involve multiple plugins
  • Loading branch information
ThrawnCA committed Oct 4, 2024
1 parent 25907f2 commit 1665523
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .ahoy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,12 @@ commands:
) || [ "${ALLOW_BDD_FAIL:-0}" -eq 1 ]
elif [ "$BEHAVE_TAG" = "authenticated" ]; then
# run any tests that don't have a specific tag
ahoy cli "behave -k ${*:-test/features} --tags=-unauthenticated --tags=-smoke --tags=-OpenData" \
ahoy cli "behave -k ${*:-test/features} --tags=-unauthenticated --tags=-smoke --tags=-OpenData --tags=-multi_plugin" \
|| [ "${ALLOW_BDD_FAIL:-0}" -eq 1 ]
else
if [ "$BEHAVE_TAG" != "multi_plugin" ]; then
BEHAVE_TAG="$BEHAVE_TAG --tags=-multi_plugin"
fi
# run tests with the specified tag
ahoy cli "behave -k ${*:-test/features} --tags=$BEHAVE_TAG" \
|| [ "${ALLOW_BDD_FAIL:-0}" -eq 1 ]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
fail-fast: true
matrix:
ckan-version: ["2.10", 2.9]
behave-tag: [smoke, unauthenticated, OpenData, authenticated]
behave-tag: [smoke, unauthenticated, multi_plugin, OpenData, authenticated]

name: Run ${{ matrix.behave-tag }} tests on CKAN ${{ matrix.ckan-version }}
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions test/features/admin_reporting.feature
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@reporting
@OpenData
@multi_plugin
Feature: AdminReporting

Scenario: As an admin user of my organisation, I can view 'My Reports' tab in the dashboard and show the 'Admin Report' with filters and table columns
Expand Down
1 change: 1 addition & 0 deletions test/features/comments.feature
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@comments
@OpenData
@multi_plugin
Feature: Comments

@unauthenticated
Expand Down
1 change: 1 addition & 0 deletions test/features/data_validation.feature
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@config
@OpenData
@multi_plugin
Feature: Data Validation

Scenario Outline: As a sysadmin, admin and editor user of the dataset organisation I can see the 'JSON' button
Expand Down
1 change: 1 addition & 0 deletions test/features/datarequest.feature
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@datarequest
@OpenData
@multi_plugin
Feature: Data Request

@unauthenticated
Expand Down
1 change: 1 addition & 0 deletions test/features/datarequest_circumstances.feature
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@data-requests-circumstances
@OpenData
@multi_plugin
Feature: Datarequest-circumstances

Scenario: As a sysadmin user when I go to the admin config page I can view the data requests closing circumstances textarea
Expand Down
1 change: 1 addition & 0 deletions test/features/dataset_schema.feature
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@dataset_schema
@OpenData
@multi_plugin
Feature: Dataset Schema

Scenario Outline: Add new dataset metadata fields for default data schema validation
Expand Down
1 change: 1 addition & 0 deletions test/features/engagement_reporting.feature
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@reporting
@OpenData
@multi_plugin
Feature: Engagement Reporting

Scenario Outline: As a user with admin or editor role capacity of an organisation, I can view 'My Reports' tab in the dashboard and show the engagement report with filters
Expand Down
1 change: 1 addition & 0 deletions test/features/reporting.feature
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@reporting
@OpenData
@multi_plugin
Feature: Reporting

@unauthenticated
Expand Down
1 change: 1 addition & 0 deletions test/features/schema_generation.feature
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@OpenData
@multi_plugin
Feature: Schema Generation
Enable worker with `ckan jobs clear && ckan jobs worker`, since these tests rely on background tasks

Expand Down

0 comments on commit 1665523

Please sign in to comment.