Migrate CI/CD pipeline to GitHub Actions#459
Conversation
Replace outdated Travis CI configuration with modern GitHub Actions workflow: - Use Python 3.12 (matching runtime.txt) - Test against PostgreSQL 14, 15, and 16 - Add pip caching for faster builds - Install required LDAP system dependencies
There was a problem hiding this comment.
Pull request overview
This PR modernizes the CI/CD pipeline by migrating from Travis CI to GitHub Actions, updating Python from 3.7/3.8 to 3.12, and PostgreSQL from versions 9.5-11 to 14-16. The new workflow includes pip caching and proper LDAP system dependencies.
Changes:
- Removed outdated Travis CI configuration (.travis.yml)
- Added new GitHub Actions workflow with matrix testing across PostgreSQL 14, 15, and 16
- Configured pip caching and LDAP system dependencies (libldap2-dev, libsasl2-dev)
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| .travis.yml | Removed legacy Travis CI configuration that tested Python 3.7/3.8 with PostgreSQL 9.5-11 |
| .github/workflows/ci.yml | Added modern GitHub Actions workflow using Python 3.12, PostgreSQL 14-16, with pip caching and LDAP dependencies |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
.github/workflows/ci.yml
Outdated
| pip freeze | ||
|
|
||
| - name: Run tests | ||
| run: python -Wall manage.py test -v 2 |
There was a problem hiding this comment.
The Python flag syntax is incorrect. The flag should be "-W all" (with a space) rather than "-Wall". The "-Wall" syntax is from GCC/C compilers, not Python. This will cause the test command to fail. The correct command should be: python -W all manage.py test -v 2
| run: python -Wall manage.py test -v 2 | |
| run: python -W all manage.py test -v 2 |
The main settings.py ignores DATABASE_URL during tests, causing Django to attempt Unix socket connection which doesn't work with containerized PostgreSQL. Add settings_ci.py to provide explicit TCP connection config for the CI environment.
Replace outdated Travis CI configuration with modern GitHub Actions workflow: