Skip to content

Comments

Update GitHub workflows for testing QuantEcon environment across all platforms with modern action versions and optimized scheduling#7

Open
Copilot wants to merge 6 commits intomainfrom
copilot/fix-6
Open

Update GitHub workflows for testing QuantEcon environment across all platforms with modern action versions and optimized scheduling#7
Copilot wants to merge 6 commits intomainfrom
copilot/fix-6

Conversation

Copy link
Contributor

Copilot AI commented Aug 14, 2025

This PR modernizes and expands the GitHub workflows that test the environment.yml file against QuantEcon lecture series repositories. The workflows now comprehensively test the environment across Linux, macOS, and Windows platforms with updated dependencies and optimized scheduling.

Key Changes

Updated Workflow Configuration

  • Modernized action versions: Updated to actions/checkout@v5, conda-incubator/setup-miniconda@v3, and actions/upload-artifact@v4
  • Python version alignment: Changed from Python 3.9 to 3.13 to match the current environment.yml specification
  • Smart triggering: Added path-based triggers so workflows only execute when environment.yml is modified, reducing unnecessary CI runs

Optimized Scheduling

  • Linux: Weekly testing on Sundays at 22:00 UTC (changed from daily)
  • macOS: Weekly testing on Mondays at 22:00 UTC
  • Windows: Weekly testing on Thursdays at 22:00 UTC

This provides comprehensive weekly coverage across all platforms while reducing CI resource usage compared to the previous daily Linux runs.

Expanded Repository Coverage

Added comprehensive testing for all required lecture series:

  • lecture-python-programming.myst (existing)
  • lecture-python-intro (newly added)
  • lecture-python-advanced.myst (existing)
  • lecture-python.myst (existing, now with JAX/PyTorch support)
  • lecture-jax (newly added with JAX/PyTorch support)

Removed outdated repository python-lecture-sandpit.myst that was no longer required.

JAX and PyTorch Integration

For repositories requiring advanced ML libraries (lecture-python.myst and lecture-jax), the workflows now install:

  • PyTorch (CPU-only version for CI compatibility)
  • JAX with CPU backend (jax[cpu])
  • NumPyro and Pyro probabilistic programming libraries
  • Custom JAX installation validation via scripts/test-jax-install.py

Cross-Platform Consistency

All platforms use consistent bash shells for better cross-platform compatibility and use the same installation procedures.

Testing

  • Validated YAML syntax across all workflow files
  • Tested JAX CPU installation and functionality
  • Tested PyTorch CPU installation
  • Verified all probabilistic programming libraries install correctly
  • Confirmed the JAX test script executes successfully

This update ensures the QuantEcon environment is thoroughly tested across all supported platforms and lecture series with an efficient weekly schedule, providing confidence in environment compatibility for users across different operating systems while optimizing CI resource usage.

Fixes #6.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot AI self-assigned this Aug 14, 2025
Copy link
Contributor Author

Copilot AI commented Aug 14, 2025

@mmcky 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs.

I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review.

Co-authored-by: mmcky <8263752+mmcky@users.noreply.github.com>
@mmcky
Copy link
Contributor

mmcky commented Aug 14, 2025

@copilot when you're finished your work -- can you please resolve the merge conflicts. I update the main to increment the version numbers of some actions that we have used in the past.

Copilot AI changed the title [WIP] MAIT: update GitHub actions for testing QuantEcon environment Update GitHub workflows for testing QuantEcon environment across all platforms Aug 14, 2025
Copilot AI requested a review from mmcky August 14, 2025 02:46
Copilot AI added 2 commits August 14, 2025 02:52
- Updated action versions to actions/checkout@v5 to match main branch
- Kept comprehensive workflow improvements with new lecture series
- Preserved JAX and PyTorch integration features
- Maintained path-based triggering and cross-platform testing
Copy link
Contributor Author

Copilot AI commented Aug 14, 2025

@copilot when you're finished your work -- can you please resolve the merge conflicts. I update the main to increment the version numbers of some actions that we have used in the past.

The merge conflicts have been resolved successfully (commit 824a0a2). I've updated the workflows to use the newer action versions from main (actions/checkout@v5) while preserving all the comprehensive workflow improvements including the new lecture series testing, JAX/PyTorch integration, and cross-platform compatibility.

Copilot AI changed the title Update GitHub workflows for testing QuantEcon environment across all platforms Update GitHub workflows for testing QuantEcon environment across all platforms with modern action versions Aug 14, 2025
push:
branches:
- main
paths:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot what does this do? Why is it needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The paths: configuration is a GitHub Actions trigger filter that makes the workflow more efficient. It ensures the workflow only runs when the environment.yml file is modified on pushes to main, rather than running on every push.

Without this filter, the environment testing workflows would run on every commit to main (even for documentation changes or other files), which wastes CI resources. With paths: ['environment.yml'], the workflow only executes when there are actual changes to the environment file that need testing.

This pattern is applied consistently across all three platform workflows (Linux, macOS, Windows) for efficiency while maintaining the scheduled runs for regular validation.

@mmcky
Copy link
Contributor

mmcky commented Aug 14, 2025

@copilot I see the linux workflow is set to run daily. Can we please update this to weekly on Sundays.

Co-authored-by: mmcky <8263752+mmcky@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Aug 14, 2025

@copilot I see the linux workflow is set to run daily. Can we please update this to weekly on Sundays.

Updated the Linux workflow to run weekly on Sundays instead of daily. Changed the cron schedule from '0 22 * * *' to '0 22 * * 0' (commit: efe82cd).

Copilot AI changed the title Update GitHub workflows for testing QuantEcon environment across all platforms with modern action versions Update GitHub workflows for testing QuantEcon environment across all platforms with modern action versions and optimized scheduling Aug 14, 2025
@mmcky mmcky marked this pull request as ready for review August 14, 2025 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MAIT: update GitHub actions for testing QuantEcon environment

2 participants