Skip to content

Adds docker setup for marvin #61

Adds docker setup for marvin

Adds docker setup for marvin #61

Workflow file for this run

name: Run Test Suite
on: [push, pull_request]
env:
SAS_BASE_DIR: sas
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
group: [1, 2, 3, 4, 5]
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
cache: 'pip'
cache-dependency-path: '**/setup.cfg'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ".[dev,web,db]"
- name: Lint with flake8
run: |
pip install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Cache Files
id: cache-sas
uses: actions/cache@v3
with:
path: ${{ env.SAS_BASE_DIR }}
key: ${{ runner.os }}-sas-${{ hashFiles('sas/**') }}
restore-keys: |
${{ runner.os }}-sas-
- name: Download and Check Data
if: steps.cache-sas.outputs.cache-hit != 'true'
run: |
mkdir ${{ env.SAS_BASE_DIR }}
python bin/get_test_data.py
ls ${{ env.SAS_BASE_DIR }}/*
find ${{ env.SAS_BASE_DIR }} -name '*'
find ${{ env.SAS_BASE_DIR }} -name '*' | wc -l
du -sh ${{ env.SAS_BASE_DIR }}
- name: Setup SDSS-IV data netrc
uses: extractions/netrc@v1
with:
machine: data.sdss.org
username: ${{ secrets.S4_USERNAME }}
password: ${{ secrets.S4_PASSWORD }}
- name: Setup SDSS-IV api netrc
uses: extractions/netrc@v1
with:
machine: api.sdss.org
username: ${{ secrets.S4_USERNAME }}
password: ${{ secrets.S4_PASSWORD }}
- name: Run tests
run: |
pytest tests --splits 5 --group ${{ matrix.group }} --durations-path tests/.test_durations --local-only -m "not uses_web and not uses_db and not slow"
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml