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 PR workflow for docs/pkg builds #35

Merged
merged 1 commit into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
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
27 changes: 27 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: "Build"

on:
workflow_call:

jobs:
build:
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v4"
- name: "Set up Python"
uses: "actions/setup-python@v5"
with:
python-version: "3.11"
- name: "Install python dependencies"
run: |
pip install build setuptools wheel
- name: "Build wheels"
run: |
make build
- name: "Upload wheels"
uses: "actions/upload-artifact@v4"
with:
name: "pulp_docs_package"
path: |
dist/
if-no-files-found: "error"
25 changes: 0 additions & 25 deletions .github/workflows/ci.yml

This file was deleted.

19 changes: 19 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: "Docs"

on:
workflow_call:

jobs:
test:
runs-on: "ubuntu-20.04"
steps:
- uses: "actions/checkout@v4"
- name: "Set up Python"
uses: "actions/setup-python@v5"
with:
python-version: "3.11"
- name: "Install Test Dependencies"
run: |
pip install -r doc_requirements.txt
- name: Build docs
run: make docs
28 changes: 28 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: "pulp-docs CI"

on:
pull_request:

concurrency:
group: "main-${{ github.ref_name }}-${{ github.workflow }}"
cancel-in-progress: true

jobs:
build:
uses: "./.github/workflows/build.yml"
docs:
needs:
- "build"
uses: "./.github/workflows/docs.yml"
ready-to-ship:
# This is a dummy dependent task to have a single entry for the branch protection rules.
runs-on: "ubuntu-latest"
needs:
- "docs"
if: "always()"
steps:
- name: "Collect needed jobs results"
run: |
echo '${{toJson(needs)}}' | jq -r 'to_entries[]|select(.value.result!="success")|.key + ": " + .value.result'
echo '${{toJson(needs)}}' | jq -e 'to_entries|map(select(.value.result!="success"))|length == 0'
echo "CI says: Looks good!"
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
build:
pyproject-build -n

docs:
pulp-docs build

.PHONY: build docs
1 change: 1 addition & 0 deletions doc_requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.
1 change: 0 additions & 1 deletion tests/fixtures/new_repo1
Submodule new_repo1 deleted from 1a090a