Skip to content

Merge pull request #527 from jhu-bids/gh-action-tests #9

Merge pull request #527 from jhu-bids/gh-action-tests

Merge pull request #527 from jhu-bids/gh-action-tests #9

# Built 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 ]
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
- 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: |
python -m pip install --upgrade pip
pip install --upgrade wheel
pip install --upgrade setuptools
pip install -r requirements.txt
- name: Run tests
run: make test-backend