name: Copyright

on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - '**'

jobs:

  build-and-test:
    name: copyright
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v1

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

      - name: install chi
        run: |
          python --version
          python -m pip install --upgrade pip setuptools wheel
          python -m pip install .
      - name: run copyright test
        run: |
          python run-tests.py --copyright
