diff --git a/.github/workflows/unittests.yaml b/.github/workflows/unittests.yaml new file mode 100644 index 000000000..2c0ddb9c6 --- /dev/null +++ b/.github/workflows/unittests.yaml @@ -0,0 +1,5 @@ +name: Run Fence unit tests +on: push +jobs: + run_tests: + uses: uc-cdis/.github/.github/workflows/python_unit_test.yaml@8445812b85abd7246fc88c2db3726c292595708f diff --git a/.secrets.baseline b/.secrets.baseline index 2423d6566..4f1ca14ad 100644 --- a/.secrets.baseline +++ b/.secrets.baseline @@ -368,5 +368,5 @@ } ] }, - "generated_at": "2023-05-15T16:30:09Z" + "generated_at": "2023-05-18T19:06:37Z" } diff --git a/tests/ci_commands_script.sh b/tests/ci_commands_script.sh new file mode 100644 index 000000000..c53e1fe40 --- /dev/null +++ b/tests/ci_commands_script.sh @@ -0,0 +1 @@ +poetry run pytest -vv --cov=fence --cov=migrations/versions --cov-report xml tests diff --git a/tests/ci_setup.sh b/tests/ci_setup.sh new file mode 100644 index 000000000..5adf5c247 --- /dev/null +++ b/tests/ci_setup.sh @@ -0,0 +1,6 @@ +psql -c 'SELECT version();' -U postgres +psql -U postgres -c "create database fence_test_tmp" + +sudo rm -f /etc/boto.cfg +mkdir -p tests/resources/keys; cd tests/resources/keys; openssl genrsa -out test_private_key.pem 2048; openssl rsa -in test_private_key.pem -pubout -out test_public_key.pem +openssl genrsa -out test_private_key_2.pem 2048; openssl rsa -in test_private_key_2.pem -pubout -out test_public_key_2.pem