-
Notifications
You must be signed in to change notification settings - Fork 141
chore: test Academy exercises #2097
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
ebf76a7 to
05099c1
Compare
|
Preview for this PR was built for commit |
|
From my perspective, we should design them in a way that they run automatically and do not require manual start-up. Otherwise, we'll forget about it eventually. |
|
Sure, I'd make a GitHub Action, which runs like once a week or once a month (depends on our ability to fix the exercises, doesn't make sense to run them too often). |
|
(Creating such GitHub Action is a matter of a few lines and I'll add it to this PR) |
|
Preview for this PR was built for commit |
|
Preview for this PR was built for commit |
|
Preview for this PR was built for commit |
|
Preview for this PR was built for commit |
|
Preview for this PR was built for commit |
0214184 to
b930d1f
Compare
|
Preview for this PR was built for commit |
|
Preview for this PR was built for commit |
4fccbf4 to
96ae391
Compare
|
Preview for this PR was built for commit |
|
Preview for this PR was built for commit |
|
Preview for this PR was built for commit |
|
Preview for this PR was built for commit |
…ity of uv options
6c5f05b to
118a550
Compare
|
Preview for this PR was built for commit |
|
I think this should be ready now. The Bats tests currently do fail, because there are failing exercises, so that's expected. But the testing infrastructure is solid and this PR is about the infrastructure. I've set the frequency of the tests to monthly and let's see. I didn't want to snowball this PR, so I recorded the failures and other issues separately and I'll work on them in subsequent PRs: |
| - Run `vale sync` to download styles | ||
| - Configure exceptions in `accepts.txt` | ||
|
|
||
| ### Testing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TC-MO Can you take a look at this README change, please? Does it make sense this way?
| "dependencies": { | ||
| "@apify/ui-library": "^1.97.2", | ||
| "@apify/ui-icons": "^1.19.0", | ||
| "@apify/ui-library": "^1.97.2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not my change, npm re-ordered this on its own 👀
| <Exercises /> | ||
|
|
||
| ### Scrape AliExpress | ||
| ### Scrape LEGO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the only I fixed. After this one I decided fixing the exercises should be in separate PRs, not in this one: #2113
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is being reviewed by Cursor Bugbot
Details
Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
Comment @cursor review or bugbot run to trigger another review on this PR
sources/academy/webscraping/scraping_basics_python/exercises/process_products_json.py
Show resolved
Hide resolved
sources/academy/webscraping/scraping_basics_javascript/exercises/crawlee_netflix_ratings.mjs
Show resolved
Hide resolved
sources/academy/webscraping/scraping_basics_python/exercises/test.bats
Outdated
Show resolved
Hide resolved
sources/academy/webscraping/scraping_basics_javascript/exercises/test.bats
Outdated
Show resolved
Hide resolved
|
Preview for this PR was built for commit |
This is a proof of concept how we could test exercises in the academy:
bats -r --print-output-on-failure .brew install batsTodo:
Note
Adds a monthly GitHub Action and Bats-based suite to run Academy JS/Python exercise solutions, embeds solutions into lessons, and updates docs/ignore files.
.github/workflows/test-academy.ymlto run Academy exercises via Node (npm) and Python (uv).sources/academy/**/exercises/test.bats(JS & Python) executing solutions and asserting outputs.test:academyand dev dependencybats.CodeBlock+!!raw-loaderacross JS/Python lessons (04–12), replacing inline snippets..gitignoreto exclude exercise artifacts (storage,node_modules,package*.json,dataset.json).CONTRIBUTING.md(broken links check + Academy exercises CI).Written by Cursor Bugbot for commit 118a550. Configure here.