From 4b99b8aacdfb1f4d85f223c4c37fb5cc9604c108 Mon Sep 17 00:00:00 2001 From: D-Pankey <30415217+D-Pankey@users.noreply.github.com> Date: Wed, 7 Feb 2024 15:41:26 -0500 Subject: [PATCH] Create github-actions.yml --- .github/workflows/github-actions.yml | 68 ++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 .github/workflows/github-actions.yml diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml new file mode 100644 index 00000000..0d9ebd03 --- /dev/null +++ b/.github/workflows/github-actions.yml @@ -0,0 +1,68 @@ +on: + push: + branches: [ "release/1.30.0" ] + +jobs: + build: + + runs-on: ubuntu-latest + + services: + postgres: + image: postgres:latest + env: + POSTGRES_USER: postgres + POSTGRES_PASSWORD: postgres + POSTGRES_DB: github_actions + ports: + - 5432:5432 + # needed because the postgres container does not provide a healthcheck + options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 + + + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.9 + uses: actions/setup-python@v4 + with: + python-version: 3.9 + - name: Install dependencies + run: | + pip install pip==19.3.1 + pip install --force-reinstall 'setuptools<58.0.0' + pip install -r requirements.txt + pip install -r requirements-toil.txt + #python manage.py migrate + - name: Run migrations + run: python manage.py migrate + - name: Run test + #run: python manage.py test + run: | + coverage run --source='.' manage.py test + coverage report -m --fail-under=75 + - name: Run flake8 + uses: suo/flake8-github-action@releases/v1 + with: + checkName: 'build' # NOTE: this needs to be the same as the job name + env: + RIDGEBACK_DB_NAME: github_actions + RIDGEBACK_DB_PASSWORD: postgres + RIDGEBACK_DB_USERNAME: postgres + RIDGEBACK_TOIL_JOB_STORE_ROOT: /sample_path + RIDGEBACK_TOIL_WORK_DIR_ROOT: /sample_path + RIDGEBACK_TOIL_TMP_DIR_ROOT: /sample_path + RIDGEBACK_LSF_WALLTIME: 10:00 + RIDGEBACK_LSF_SLA: SLA + CELERY_LOG_PATH: /sample_path + CELERY_PID_PATH: /sample_path + CELERY_BEAT_SCHEDULE_PATH: /sample_path + RIDGEBACK_NEXTFLOW_JOB_STORE_ROOT: /sample_path + RIDGEBACK_NEXTFLOW_WORK_DIR_ROOT: /sample_path + RIDGEBACK_NEXTFLOW_TMP_DIR_ROOT: /sample_path + SINGULARITY_PATH: /sample_singularity + RIDGEBACK_VENV: /sample_path + RIDGEBACK_PATH: /sample_path + RIDGEBACK_PORT: 4009 + RIDGEBACK_DEFAULT_QUEUE: sample_queue + RIDGEBACK_RABBITMQ_USERNAME: sample_username + RIDGEBACK_RABBITMQ_PASSWORD: sample_password