takuseno/minerva

View on GitHub
.github/workflows/test.yml

Summary

Maintainability
Test Coverage
name: test

on: [push, pull_request]

jobs:
  build:
    runs-on: ubuntu-16.04
    steps:
      - uses: actions/checkout@v2
      - name: Setup Python.3.6.x
        uses: actions/setup-python@v1
        with:
          python-version: 3.6.x
      - name: Setup Node.js
        uses: actions/setup-node@v1
        with:
          node-version: 12.x
      - name: Cache pip
        uses: actions/cache@v1
        with:
          path: ~/.cache/pip
          key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
          restore-keys: |
            ${{ runner.os }}-pip-
            ${{ runner.os }}-
      - name: Install packages
        run: |
          python -m pip install --upgrade pip
          pip install -r requirements.txt
          pip install pytest-cov gym flask msgpack
          npm install
      - name: Unit tests
        env:
          CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
        run: |
          ./scripts/test
          bash <(curl -s https://codecov.io/bash)