Skip to content

Feature dandi cron check #191

Feature dandi cron check

Feature dandi cron check #191

name: OpenScope Actions
on:
push:
branches:
- main
pull_request:
branches:
- main
env: # Define environment variables for the entire job
DBNAME: ${{ secrets.DBNAME }}
FIREBASE_CREDENTIALS: ${{ secrets.FIREBASE_CREDENTIALS }}
HOST: ${{ secrets.HOST }}
PASSWORD: ${{ secrets.PASSWORD }}
PORT: ${{ secrets.PORT }}
USER: ${{ secrets.USER }}
DANDI_API_KEY: ${{ secrets.DANDI_API_KEY }}
jobs:
Test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7.17
uses: actions/setup-python@v1
with:
python-version: 3.7.17
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[TEST]
pip install pytest-cov
pip install wheel
pip install h5py==2.10.0
pip install allenSDK
- name: Create Firebase Credentials File
run: |
echo "$FIREBASE_CREDENTIALS" > firebase_credentials.json
# Set the path to the credentials file as an environment variable
- name: Set Firebase Credentials Path as Environment Variable
run: echo "FIREBASE_CREDENTIALS_PATH=$(pwd)/firebase_credentials.json" >> $GITHUB_ENV
- name: Test with pytest
run: pytest -vv --cov=./ --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./
env_vars: OS,PYTHON
fail_ci_if_error: true
files: ./coverage.xml
flags: unittests
name: codecov-umbrella
verbose: true
Lint:
name: Lint
runs-on: "ubuntu-latest"
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Python dependencies
run: pip install flake8
- name: Run Linter
uses: wearerequired/lint-action@v1
with:
flake8_extensions: py
flake8: true