janaipakos / ghibliapi

A simple API for Studio Ghibli resources. Unofficial/fan-made
https://ghibliapi.herokuapp.com
MIT License
310 stars 109 forks source link

Automated Image URL Link Checker #50

Closed spencerlepine closed 2 years ago

spencerlepine commented 2 years ago

Automated Image URL Link Checker

To help maintain the API, it would help to automatically verify the image URLs are still valid.

I created a GitHub Action workflow to pull all the image URLs and verify they are still valid. If the action fails, you can view the test output logs to see which URL(s) are invalid.

Note: This is looking at the image and movie_banner keys of objects in the films array (via data.json)

Files Changed

./github/workflows/validate-images.yml

GitHub Action workfow to run test script with scheduled CRON job.

./github/url.test.js

Test script to load data.json, collect image URLs, and fetch the URL to verify it does not throw a 404 error.

README.md

Added Action badge to README to show passing/failing status of link checkers.

spencerlepine commented 2 years ago

having issues with no package.lock, not working right now. Not sure if you exlcuded package-lock.json on purpose