-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding shell script and workflow file
Workflow file runs the shell script. Shell script sets up emission environment and runs TestOverpass.py.
- Loading branch information
1 parent
7839951
commit b1b0698
Showing
2 changed files
with
58 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: overpass-test | ||
|
||
# Controls when the action will run. Triggers the workflow on push or pull request | ||
# events but only for the master branch | ||
on: | ||
push: | ||
branches: | ||
- overpass | ||
# schedule: | ||
|
||
# # Run every Sunday at 6:05 am | ||
# - cron: '5 6 * * 0' | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
# Tests runner is functional | ||
- name: Workflow test | ||
run: echo Good morning! | ||
|
||
# Runs TestOverpass.py to check for API functionality | ||
- name: Test Overpass | ||
env: | ||
OVERPASS_KEY: '${{ secrets.OVERPASS_API }}' | ||
run: ../../emission/individual_tests/setup_overpass_tests.sh | ||
|
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,29 @@ | ||
#Set up the testing environment | ||
# Using an automated install | ||
cd /src/e-mission-server | ||
|
||
#set database URL using environment variable | ||
echo ${DB_HOST} | ||
if [ -z ${DB_HOST} ] ; then | ||
local_host=`hostname -i` | ||
sed "s_localhost_${local_host}_" conf/storage/db.conf.sample > conf/storage/db.conf | ||
else | ||
sed "s_localhost_${DB_HOST}_" conf/storage/db.conf.sample > conf/storage/db.conf | ||
fi | ||
cat conf/storage/db.conf | ||
|
||
echo "Setting up conda..." | ||
source setup/setup_conda.sh Linux-x86_64 | ||
|
||
echo "Setting up the test environment..." | ||
source setup/setup_tests.sh | ||
|
||
echo "Running tests..." | ||
source setup/activate_tests.sh | ||
|
||
echo "Adding permissions for the runIntegrationTests.sh script" | ||
chmod +x runIntegrationTests.sh | ||
echo "Permissions added for the runIntegrationTests.sh script" | ||
|
||
set -e | ||
PYTHONPATH=. python -m unittest emission/individual_tests/TestOverpass.py |