Capitalize name links #272
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build and test e2e | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
jobs: | |
ci: | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.9.13", "3.13.1"] | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
lang: ["es", "en"] | |
ignore: [false, true] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Run image | |
uses: abatilo/[email protected] | |
with: | |
poetry-version: "2.0.1" | |
- name: Install fa-scraper | |
run: poetry install | |
- name: Install csv-diff | |
# Install csv-diff with https://github.com/simonw/csv-diff/pull/19 | |
run: python3 -m pip install git+https://github.com/mikecoop83/csv-diff@c3d32f758343a2ba3737d612e6e906fd9d77322b | |
- name: Run fa-scraper | |
env: | |
TEST_ACCOUNT_ID: ${{ secrets.TEST_ACCOUNT_ID }} | |
FA_LANG: ${{ matrix.lang }} | |
run: | | |
if [ -n ${{ matrix.ignore }} ]; then | |
EXTRA_FLAGS="--ignore TV --ignore TVMS --ignore TVS" | |
fi | |
poetry run fa-scraper ${TEST_ACCOUNT_ID} --lang ${FA_LANG} --csv output.csv ${EXTRA_FLAGS} | |
shell: bash | |
- name: Check output | |
env: | |
FA_LANG: ${{ matrix.lang }} | |
run: | | |
if [ -n ${{ matrix.ignore }} ]; then | |
SUFFIX="-ignore" | |
fi | |
OUTPUT=$(csv-diff --encoding "utf-8" output.csv testdata/expected-${FA_LANG}${SUFFIX}.csv) | |
if [ -n "$OUTPUT" ]; then | |
echo "$OUTPUT" | |
exit 1 | |
fi | |
shell: bash | |
- name: Upload artifacts | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: output-${{ matrix.lang }}-${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.ignore }} | |
path: output.csv |