name: Continuous Integration

on: [push, pull_request, workflow_dispatch]

jobs:
  build:
    name: Build and check formatting
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Set up Python 3.7
        uses: actions/setup-python@v1
        with:
          python-version: 3.7
      - name: Download Parsec Mock, install dependencies and execute all tests
        run: |
          curl -s -N -L https://github.com/parallaxsecond/parsec-mock/archive/refs/tags/0.1.1.tar.gz | tar xz
          cd parsec-mock-0.1.1/
          python -m pip install --upgrade pip
          pip install -r requirements.txt
          cd ..
          ./tests/ci.sh
