-
Notifications
You must be signed in to change notification settings - Fork 10
54 lines (51 loc) · 2.17 KB
/
test_backend_e2e_and_unit_and_qc.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Test - Backend - E2E and unit tests and QC
# todo: Add 'qc' parts eventually to this, or rather, codestyle (e.g. black, flake8, pylint, docstyle, etc.)
# Built w/ inspiration from: https://docs.github.com/en/actions/guides/building-and-testing-python
name: Test - Backend - E2E and unit tests and QC
on:
workflow_dispatch:
push:
branches: [ develop, main ]
pull_request:
branches: [ develop, main ]
schedule:
- cron: '0 14 * * *' # every day 2pm GMT (9/10am EST/EDT)
jobs:
test:
strategy:
fail-fast: false
matrix:
# os: [ ubuntu-latest, windows-latest ]
os: [ ubuntu-latest ]
# python-version: [ "3.10", "3.11" ]
python-version: [ "3.10" ]
runs-on: ${{ matrix.os }}
steps:
- name: Check out repository
uses: actions/checkout@v3
with:
submodules: true
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: 'Create env file'
run: |
mkdir env
echo "${{ secrets.ENV_FILE }}" > env/.env
- name: Create and start virtual environment
run: |
python3 -m venv venv
source venv/bin/activate
- name: Install dependencies
run: |
# Reactivate install upgrades of pip, wheel, &/or setuptools if needed
# python -m pip install --upgrade pip
# pip install --upgrade wheel
# pip install --upgrade setuptools
# VS Hub SDK w/ OAuth disabled: https://github.com/jhu-bids/TermHub/issues/863
# TOKEN=$(grep '^PALANTIR_ENCLAVE_AUTHENTICATION_BEARER_TOKEN=' env/.env | cut -d'=' -f2)
# python3 -m pip install vshub_sdk --upgrade --extra-index-url "https://:${TOKEN}@unite.nih.gov/artifacts/api/repositories/ri.artifacts.main.repository.9bc9cc56-4b8c-4560-9bfb-fba8ade55246/contents/release/pypi/simple" --extra-index-url "https://:${TOKEN}@unite.nih.gov/artifacts/api/repositories/ri.foundry-sdk-asset-bundle.main.artifacts.repository/contents/release/pypi/simple"
pip install -r requirements.txt
- name: Run tests
run: make test-backend