name: Regression Tests

on:
  push:
    branches: [main]
    tags: ["v*.*.*"]
  pull_request:
    branches: [main]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
    - name: Set up Python
      uses: actions/setup-python@v2

    # Check out a *known good* version
    # For now I am assuming 'main' is known good
    - uses: actions/checkout@v2
      # XXX: UNCOMMENT ONCE MERGED
      # with:
      #   repository: googlefonts/glyphsLib
      #   ref: main

    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install -r requirements.txt
        pip install -r requirements-dev.txt

    - name: Generate test files
      run: python3 tests/tools/generate_regression_test_files.py
      env:
        PYTHONPATH: Lib

    # Now check out the version we want to test
    - uses: actions/checkout@v2
      with:
        clean: false

    - name: Run tests
      continue-on-error: true
      run: pytest --run-regression-tests tests/regression_test.py -n auto
      env:
        PYTHONPATH: Lib

name: Regression Tests

on:
  push:
    branches: [main]
    tags: ["v*.*.*"]
  pull_request:
    branches: [main]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
    - name: Set up Python
      uses: actions/setup-python@v2

    # Check out a *known good* version
    # For now I am assuming 'main' is known good
    - uses: actions/checkout@v2
      with:
        repository: googlefonts/glyphsLib
        ref: main

    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install -r requirements.txt
        pip install -r requirements-dev.txt

    - name: Generate test files
      run: python3 tests/tools/generate_regression_test_files.py
      env:
        PYTHONPATH: Lib

    # Now check out the version we want to test
    - uses: actions/checkout@v2
      with:
        clean: false

    - name: Run tests
      continue-on-error: true
      run: pytest --run-regression-tests tests/regression_test.py -n auto
      env:
        PYTHONPATH: Lib

Revert "Ignore main branch for now"
Revert "Ignore main branch for now"

This reverts commit 6bccbff8426c45ceb1a73bc5a654e4d81c42e14a.

Now that the new code and scripts have landed, we can use main as a
point of reference.
