main-test.yaml 852 B

1234567891011121314151617181920212223242526272829303132
  1. name: pytest
  2. on:
  3. push:
  4. branches: [ master ]
  5. pull_request:
  6. branches: [ master ]
  7. jobs:
  8. run-tests:
  9. name: Run script on test repo and check output with pytest
  10. strategy:
  11. matrix:
  12. os: [ ubuntu-latest, windows-latest ]
  13. runs-on: ${{ matrix.os }}
  14. steps:
  15. - uses: actions/checkout@v2
  16. - name: Install dependencies
  17. run: |
  18. pip install -r requirements.txt
  19. pip install pytest
  20. - name: Init for tests (download test repo)
  21. # The ">" replaces newlines with spaces
  22. run: ./scripts/init-for-tests
  23. shell: bash
  24. - name: Run GPTH on test repo
  25. run: >
  26. python google_photos_takeout_helper/__main__.py
  27. -i "../__takeout_helper_test_data__/Google Photos"
  28. -o "../__takeout_helper_test_data__/output"
  29. - name: Run pytest
  30. run: python -m pytest