Skip to content

Commit

Permalink
Make all tests run before workflow fails
Browse files Browse the repository at this point in the history
  • Loading branch information
SenZmaKi committed May 22, 2024
1 parent 6af9717 commit 578d733
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 11 deletions.
60 changes: 49 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
name: test

on:
push:
branches:
- master
pull_request:
branches:
on:
push:
branches:
- master

pull_request:
branches:
- master

schedule:
# 6:00 A.M UTC == 9:00 AM EAT
- cron: '0 6 * * *'
# 6:00 A.M UTC == 9:00 AM EAT
- cron: "0 6 * * *"

jobs:
test:
Expand All @@ -28,12 +28,50 @@ jobs:

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r dev-requirements.txt
poetry install
- name: Lint with ruff
id: lint
continue-on-error: true
run: poetry run ruff .

- name: Run Tests
run: poetry run poe test_ddl
- name: Test Pahe
id: test_pahe
continue-on-error: true
run: poetry run test_pahe_ddl

- name: Test Gogo Norm
id: test_gogo_norm
continue-on-error: true
run: poetry run test_gogo_norm_ddl

- name: Test Gogo HLS
id: test_gogo_hls
continue-on-error: true
run: poetry run test_gogo_hls_ddl

- name: Check results
run: |
failed=false
if [ ${{ steps.lint.outcome }} == "failure" ]; then
echo "Lint with ruff failed"
failed=true
fi
if [ ${{ steps.test_pahe.outcome }} == "failure" ]; then
echo "Test Pahe failed"
failed=true
fi
if [ ${{ steps.test_gogo_norm.outcome }} == "failure" ]; then
echo "Test Gogo Norm failed"
failed=true
fi
if [ ${{ steps.test_gogo_hls.outcome }} == "failure" ]; then
echo "Test Gogo HLS failed"
failed=true
fi
if [ $failed = true ]; then
exit 1
fi
1 change: 1 addition & 0 deletions senpwai/scrapers/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,7 @@ def print_metadata(metadata: AnimeMetadata):
conditional_print("Dub metadata")
print_metadata(metadata) # type: ignore
if args.site == PAHE:
raise
episode_page_links = test_get_episode_page_links(
target_result[2],
target_result[1],
Expand Down

0 comments on commit 578d733

Please sign in to comment.