Repository: mx-psi/fa-scraper (language: python)

Issue:
Add end to end test suite
- [x] Add test suite on Linux
- [x] Add test suite on macOS (needs fix on locale)
- [x] Add test suite on Windows (needs fix on locale?)


Discussion / hints:

Fix patch:
diff --git a/.github/workflows/endtoend.yaml b/.github/workflows/endtoend.yaml
new file mode 100644
index 0000000..5278556
--- /dev/null
+++ b/.github/workflows/endtoend.yaml
@@ -0,0 +1,31 @@
+name: build and test e2e
+on: pull_request
+
+jobs:
+  ci:
+    strategy:
+      fail-fast: false
+      matrix:
+        python-version: [3.5.10, 3.10.0]
+        poetry-version: ["1.1.11"]
+        os: [ubuntu-latest]
+    runs-on: ${{ matrix.os }}
+    steps:
+      - uses: actions/checkout@v2
+      - uses: actions/setup-python@v2
+        with:
+          python-version: ${{ matrix.python-version }}
+      - name: Run image
+        uses: abatilo/actions-poetry@v2.0.0
+        with:
+          poetry-version: ${{ matrix.poetry-version }}
+      - name: Install fa-scrapper
+        run: poetry install
+      - name: Install csv-diff
+        run: python3 -m pip install csv-diff
+      - name: Run fa-scrapper
+        env:
+          TEST_ACCOUNT_ID: ${{ secrets.TEST_ACCOUNT_ID }}
+        run: poetry run fa-scrapper ${TEST_ACCOUNT_ID} --csv output.csv
+      - name: Check output
+        run: csv-diff output.csv testdata/expected.csv


Test patch:
diff --git a/testdata/expected.csv b/testdata/expected.csv
new file mode 100644
index 0000000..599bf60
--- /dev/null
+++ b/testdata/expected.csv
@@ -0,0 +1,3 @@
+Title,Year,Directors,WatchedDate,Rating,Rating10
+The Lion King,1994,"Rob Minkoff, Roger Allers",2021-11-10,3.5,7
+Mad Max: Fury Road,2015,George Miller,2021-11-10,5.0,10