name: Continuous Integration

on: [push, pull_request]

jobs:
  lint-python:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - name: Set up Python 3.7
        uses: actions/setup-python@v1
        with:
          python-version: 3.7
      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install -r requirements.txt
      - name: Lint with pylint
        run: bash ./lint.sh all

  build-python:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        python: [3.7]
    steps:
      - uses: actions/checkout@v1
      - name: Set up Python ${{ matrix.python }}
        uses: actions/setup-python@v1
        with:
          python-version: ${{ matrix.python }}
      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install -r requirements.txt
      - name: Test with pytest
        run: pytest --ignore=data_utils/query_test.py

  lint-build-js:
    runs-on: ubuntu-latest
    steps:
      - name: Install modules and run ESLint
        working-directory: ./risr-app/risr_proj/dashboard-fe
        run: |
          npm install
          npm run pretest
          npm run test

name: Continuous Integration

on: [push, pull_request]

jobs:
  lint-python:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - name: Set up Python 3.7
        uses: actions/setup-python@v1
        with:
          python-version: 3.7
      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install -r requirements.txt
      - name: Lint with pylint
        run: bash ./lint.sh all

  build-python:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        python: [3.7]
    steps:
      - uses: actions/checkout@v1
      - name: Set up Python ${{ matrix.python }}
        uses: actions/setup-python@v1
        with:
          python-version: ${{ matrix.python }}
      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install -r requirements.txt
      - name: Test with pytest
        run: pytest --ignore=data_utils/query_test.py

  lint-build-js:
    runs-on: ubuntu-latest
    env:
      working-directory: ./risr-app/risr_proj/dashboard-fe
    steps:
      - uses: actions/checkout@v1
      - name: Install module
        run: npm install
      - name: Lint with ESLint
        run: npm run pretest
      - name: Test with Jest and Enzyme
        run: npm run test

Update JS steps in workflow.
Update JS steps in workflow.
