mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-09-15 12:47:56 +08:00
Github Actions Workflow updates compatibility matrix: - Added MacOS Catalina and Big Sur to test compat matrix - Added Python 3.9 to test compat matrix, but avoid running 3.9 for matrix jobs that do not have `tables` pypi build available for the given env - Maintains running tests on both cellxgene main branch and latest pypi release. - Add explicit matrix exclusions for matrix combinations that will never pass (see comments). - Numerous refactorings to the workflow config to simplify matrix. Basically a rewrite. - The anndata pkg is now tested at a pinned release and at latest release, but no longer using `master` branch version. To limit cross-product explosion of matrix jobs, the pinned anndata version is only tested on py3.8 and cellxgene latest release. - Run unit and smoke tests in a single job, to improve speed, reduce workflow complexity and the number of jobs. Also fixes the redundant testing of unit tests. Within each job, the unit and smoke tests are run in separate steps for ease of troubleshooting. - Fixed termination of backend server to allow both smoke tests to run within a single job (both attempt to use 5005 port, sequentially, but first server was not being terminated). - Replaced `continue-on-error: true` with `fail-fast: false`, which allows all matrix jobs to run independently, while also ensuring the that entire workflow is flagged as failed if any matrix job fails - The `smoke-test-annotations` fail intermittently and have been disabled. Fix will be addressed in story: https://app.zenhub.com/workspaces/single-cell-5e2a191dad828d52cc78b028/issues/chanzuckerberg/cellxgene/2433
33 lines
668 B
Bash
Executable File
33 lines
668 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -e
|
|
|
|
# start_server_and_test
|
|
# Replicates the basic functionality of the start-server-and-test npm package
|
|
# https://www.npmjs.com/package/start-server-and-test
|
|
|
|
if [[ $# -ne 3 ]]; then
|
|
echo "Usage: start_server_and_test \'[start server script]\' [port] \'[test script]\'"
|
|
exit 1
|
|
fi
|
|
|
|
START_SERVER_SCRIPT="$1"
|
|
PORT="$2"
|
|
TEST_SCRIPT="$3"
|
|
|
|
await_port --await-free --timeout 120 "$PORT"
|
|
|
|
eval "$START_SERVER_SCRIPT &"
|
|
|
|
function finish {
|
|
SERVER_PID=`lsof -i -P -n | grep LISTEN | grep ${PORT} | awk '{ print $2 }'`
|
|
echo Killing server PID=${SERVER_PID}
|
|
kill $SERVER_PID || true
|
|
}
|
|
|
|
trap finish EXIT
|
|
|
|
await_port "$PORT"
|
|
|
|
eval "$TEST_SCRIPT"
|
|
|