name: E2E tests

on: [push, pull_request]

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v1

    - name: Set up Python
      uses: actions/setup-python@v1
      with:
        python-version: 3.8

    - name: Prepare tests
      run: |
        sudo apt install ruby
        sudo gem install ronn
        pip install -U setuptools pip requests wheel Babel

    - name: E2E tests
      run: |
        export ENVIRONMENT="CI"
        bash .scripts/tests-e2e.sh

    - name: manpage (section 1)
      run: |
        man -P $(which cat) kosmorro

    - name: manpage (section 7)
      run: |
        man -P $(which cat) 7 kosmorro
