Skip to content
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

Add a CI step to optionally recompile requirements files with pip-sync #578

Merged
merged 5 commits into from
May 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 22 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,14 @@ jobs:
mariadb-version: ["10.4"]
include:
# Not sure yet how best to include CI for a newer python version with the pip-tools workflow.
- python-version: 3.8 # Possible future version.
- python-version: 3.11 # Possible future version.
backend: "mariadb"
mariadb-version: "10.5"
- python-version: 3.8 # Possible future version.
pip-recompile: true
- python-version: 3.11 # Possible future version.
backend: "mariadb"
mariadb-version: "10.11"
pip-recompile: true

name: "py${{ matrix.python-version }}-${{ matrix.backend }}-${{ matrix.mariadb-version }}"

Expand Down Expand Up @@ -68,10 +70,26 @@ jobs:
requirements/requirements.txt
requirements/test-requirements.txt

- name: Install Dependencies
- name: Ensure pip is installed
run: |
python -m ensurepip --upgrade
python -m pip install --upgrade pip
pip install pip-tools
# Upgrade setup tools
python -m pip install --upgrade setuptools

- name: Install piptools
run: python -m pip install pip-tools

- name: Recompile pip files if requested
if: matrix.pip-recompile
run: |
pip-compile requirements/requirements.in
pip-compile requirements/test-requirements.in
# Print out changes.
git diff

- name: Install Dependencies
run: |
pip-sync requirements/requirements.txt requirements/test-requirements.txt

- name: Collect staticfiles
Expand Down
Loading