-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a github action for setting up test environment and running the tests #31
Merged
+154
−14
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,149 @@ | ||
name: "Run CI workflow" | ||
description: "Setup the e2e environment and run cypress tests in it" | ||
inputs: | ||
bundle_version: | ||
description: Version of the docker-compose bundle to use (= github release version) | ||
required: false | ||
default: "e2e-docker-compose" | ||
bundle_repo: | ||
description: Repository to retrieve the bundle from | ||
required: false | ||
default: "HSLdevcom/jore4-tools" | ||
ui_version: | ||
description: | ||
Version of ui to use (docker image tag). Set to "" if using the default | ||
version. | ||
required: false | ||
default: "" | ||
hasura_version: | ||
description: | ||
Version of hasura to use (docker image tag). Set to "" if using the | ||
default version. | ||
required: false | ||
default: "" | ||
auth_version: | ||
description: | ||
Version of auth to use (docker image tag). Set to "" if using the default | ||
version. | ||
required: false | ||
default: "" | ||
mbtiles_version: | ||
description: | ||
Version of mbtiles server to use (docker image tag). Set to "" if using | ||
the default version. | ||
required: false | ||
default: "" | ||
jore3importer_version: | ||
description: | ||
Version of jore3importer to use (docker image tag). Set to "" if using the | ||
default version. | ||
required: false | ||
default: "" | ||
testdb_version: | ||
description: | ||
Version of testdb to use (docker image tag). Set to "" if using the | ||
default version. | ||
required: false | ||
default: "" | ||
mssqltestdb_version: | ||
description: | ||
Version of mssqltestdb to use (docker image tag). Set to "" if using the | ||
default version. | ||
required: false | ||
default: "" | ||
mapmatching_version: | ||
description: | ||
Version of map matching service to use (docker image tag). Set to "" if | ||
using the default version. | ||
required: false | ||
default: "" | ||
mapmatchingdb_version: | ||
description: | ||
Version of map matching database to use (docker image tag). Set to "" if | ||
using the default version. | ||
required: false | ||
default: "" | ||
cypress_version: | ||
description: | ||
Version of cypress tests to use (docker image tag). Set to "" if using the | ||
default version. | ||
required: false | ||
default: "" | ||
hastus_version: | ||
description: | ||
Version of hastus importer to use (docker image tag). Set to "" if using | ||
the default version. | ||
required: false | ||
default: "" | ||
timetablesapi_version: | ||
description: | ||
Version of timetables api to use (docker image tag). Set to "" if using | ||
the default version. | ||
required: false | ||
default: "" | ||
tiamat_version: | ||
description: Version of tiamat to use (docker image tag). Set to "" if using | ||
the default version. | ||
required: false | ||
default: "" | ||
custom_docker_compose: | ||
description: | ||
Path for an additional docker-compose file to be used when starting up the | ||
environment. Can be used to e.g. run tests with the repository's own | ||
docker-compose.custom.yml setup | ||
required: false | ||
default: "" | ||
test-tags: | ||
description: | ||
Specify a string of tags for tests to be run in format '@smoke'. To | ||
specify multiple tags, use format '@routes @smoke'. To run all tests, set | ||
it to ''. | ||
required: false | ||
default: "@smoke" | ||
cypress_tests_kept_in_memory: | ||
description: Environment setting to set for running cypress tests. | ||
required: false | ||
default: 5 | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Extract metadata to env variables | ||
uses: HSLdevcom/jore4-tools/github-actions/extract-metadata@extract-metadata-v1 | ||
|
||
- name: Start e2e env | ||
uses: HSLdevcom/jore4-tools/github-actions/setup-e2e-environment@setup-e2e-environment-v5 | ||
with: | ||
ui_version: "${{ inputs.ui_version }}" | ||
cypress_version: "${{ inputs.cypress_version }}" | ||
bundle_version: "${{ inputs.bundle_version }}" | ||
bundle_repo: "${{ inputs.bundle_repo }}" | ||
hasura_version: "${{ inputs.hasura_version }}" | ||
auth_version: "${{ inputs.auth_version }}" | ||
mbtiles_version: "${{ inputs.mbtiles_version }}" | ||
jore3importer_version: "${{ inputs.jore3importer_version }}" | ||
testdb_version: "${{ inputs.testdb_version }}" | ||
mssqltestdb_version: "${{ inputs.mssqltestdb_version }}" | ||
mapmatching_version: "${{ inputs.mapmatching_version }}" | ||
mapmatchingdb_version: "${{ inputs.mapmatchingdb_version }}" | ||
hastus_version: "${{ inputs.hastus_version }}" | ||
timetablesapi_version: "${{ inputs.timetablesapi_version }}" | ||
tiamat_version: "${{ inputs.tiamat_version }}" | ||
custom_docker_compose: "${{ inputs.custom_docker_compose }}" | ||
|
||
- name: Seed infrastructure links | ||
uses: HSLdevcom/jore4-tools/github-actions/seed-infrastructure-links@seed-infrastructure-links-v2 | ||
|
||
- name: Seed municipalities and fare zones | ||
uses: HSLdevcom/jore4-tools/github-actions/seed-municipalities-and-fare-zones@seed-municipalities-and-fare-zones-v1 | ||
|
||
- name: Run e2e tests | ||
env: | ||
CYPRESS_TESTS_KEPT_IN_MEMORY: "${{ inputs.cypress_tests_kept_in_memory }}" | ||
uses: HSLdevcom/jore4-tools/github-actions/run-cypress-tests@run-cypress-tests-v1 | ||
with: | ||
test-tags: "${{ inputs.test-tags }}" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this "Checkout code" step be removed because it is part of
run-ci
?An old version of the action is used by the way.