-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: refactor dependency handling, update & pin all deps
This commit updates dependency handling in CI to be consistent with the conventions emerging across various other python projects, specifically: - py3 version is refreshed to 3.8 - pip-compile is used to pin all dependency versions in CI - github actions is used to periodically update the versions The motivation of doing this now is that some development crossing both (pubtools-pulp, pubtools-pulplib) is otherwise difficult to handle without breaking the CI of this project. Pinning dependencies ensures stable CI.
- Loading branch information
Showing
12 changed files
with
1,096 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
on: | ||
workflow_dispatch: {} | ||
schedule: | ||
- cron: "20 20 * * 2" | ||
|
||
name: "pip-compile: merge PR" | ||
jobs: | ||
pip_compile_merge: | ||
name: pip-compile automerge | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Look up pull request | ||
uses: juliangruber/find-pull-request-action@v1 | ||
id: find-pull-request | ||
with: | ||
branch: deps/pip-compile | ||
- name: Merge Pull Request | ||
uses: juliangruber/merge-pull-request-action@v1 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
number: ${{ steps.find-pull-request.outputs.number }} | ||
method: merge | ||
if: ${{ steps.find-pull-request.outputs.number }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
on: | ||
workflow_dispatch: {} | ||
schedule: | ||
- cron: "20 20 * * 0" | ||
|
||
name: "pip-compile: create PR" | ||
jobs: | ||
pip_compile: | ||
name: pip-compile | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.9" | ||
|
||
- name: Install system dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y libkrb5-dev | ||
- name: Install tox | ||
run: pip install tox | ||
|
||
- name: pip-compile | ||
uses: technote-space/create-pr-action@v2 | ||
with: | ||
EXECUTE_COMMANDS: tox -e pip-compile | ||
COMMIT_MESSAGE: 'chore: scheduled pip-compile' | ||
COMMIT_NAME: 'GitHub Actions' | ||
COMMIT_EMAIL: 'noreply@github.com' | ||
GITHUB_TOKEN: ${{ secrets.PIP_COMPILE_TOKEN }} | ||
PR_BRANCH_PREFIX: deps/ | ||
PR_BRANCH_NAME: 'pip-compile' | ||
PR_TITLE: 'chore: scheduled pip-compile' | ||
PR_BODY: '## Update dependencies | ||
This is a scheduled update of Python dependencies within this repo managed by pip-compile. | ||
This change will be submitted automatically within a few days if all checks have | ||
succeeded.' | ||
|
||
|
||
- name: Look up pull request | ||
uses: juliangruber/find-pull-request-action@v1 | ||
id: find-pull-request | ||
with: | ||
branch: deps/pip-compile | ||
|
||
# Immediately approve it if we can so it can be merged later | ||
- name: Approve Pull Request | ||
uses: juliangruber/approve-pull-request-action@v1 | ||
with: | ||
github-token: ${{ secrets.APPROVAL_TOKEN }} | ||
number: ${{ steps.find-pull-request.outputs.number }} | ||
# allow errors because token may be unset. | ||
continue-on-error: true | ||
if: ${{ steps.find-pull-request.outputs.number }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
include README.md | ||
include CHANGELOG.md | ||
include LICENSE | ||
include requirements.txt | ||
include requirements.in |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
six | ||
pubtools-pulplib>=2.8.0 | ||
fastpurge | ||
more_executors>=2.7.0 | ||
pushcollector>=1.2.0 | ||
pushsource |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
pytest | ||
pytest-cov | ||
coveralls | ||
mock | ||
requests_mock | ||
rpm-py-installer | ||
|
||
# The following deps are not relevant for the legacy test env. | ||
black; python_version>='3' | ||
pre-commit; python_version>='3' | ||
pylint; python_version>='3' | ||
sphinx; python_version>='3' | ||
sphinx-argparse; python_version>='3' | ||
alabaster; python_version>='3' |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters