mirror of
https://github.com/certbot/certbot.git
synced 2026-07-31 16:24:39 +02:00
Add workflow certbot/pr-test-suite
Add composite action azure_pipelines_templates_steps_tox_steps Add composite action azure_pipelines_templates_steps_sphinx_steps Add reusable workflow azure_pipelines_templates_jobs_standard_tests_jobs rename files
This commit is contained in:
committed by
Erica Portnoy
parent
3a5c92c6be
commit
bc6a84917a
@@ -0,0 +1,28 @@
|
||||
name: sphinx_steps
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Build Sphinx Documentation
|
||||
run: |-
|
||||
set -e
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y --no-install-recommends libaugeas-dev
|
||||
FINAL_STATUS=0
|
||||
declare -a FAILED_BUILDS
|
||||
tools/venv.py
|
||||
source venv/bin/activate
|
||||
for doc_path in */docs
|
||||
do
|
||||
echo ""
|
||||
echo "##[group]Building $doc_path"
|
||||
if ! sphinx-build -W --keep-going -b html $doc_path $doc_path/_build/html; then
|
||||
FINAL_STATUS=1
|
||||
FAILED_BUILDS[${#FAILED_BUILDS[@]}]="${doc_path%/docs}"
|
||||
fi
|
||||
echo "##[endgroup]"
|
||||
done
|
||||
if [[ $FINAL_STATUS -ne 0 ]]; then
|
||||
echo "##[error]The following builds failed: ${FAILED_BUILDS[*]}"
|
||||
exit 1
|
||||
fi
|
||||
shell: bash
|
||||
@@ -0,0 +1,73 @@
|
||||
name: tox_steps
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Install MacOS dependencies
|
||||
if: startsWith(env.IMAGE_NAME, 'macOS')
|
||||
run: |-
|
||||
set -e
|
||||
unset HOMEBREW_NO_INSTALL_FROM_API
|
||||
brew untap homebrew/core homebrew/cask
|
||||
brew update
|
||||
brew install augeas
|
||||
shell: bash
|
||||
- name: Install Linux dependencies
|
||||
if: startsWith(env.IMAGE_NAME, 'ubuntu')
|
||||
run: |-
|
||||
set -e
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y --no-install-recommends \
|
||||
libaugeas-dev \
|
||||
nginx-light
|
||||
sudo systemctl stop nginx
|
||||
sudo sysctl net.ipv4.ip_unprivileged_port_start=0
|
||||
shell: bash
|
||||
- uses: actions/setup-python@v5.0.0
|
||||
with:
|
||||
python-version: "${{ matrix.PYTHON_VERSION }}"
|
||||
- name: Install runtime dependencies
|
||||
run: |-
|
||||
set -e
|
||||
python3 tools/pip_install.py tox
|
||||
shell: bash
|
||||
# # This item has no matching transformer
|
||||
# - task: DownloadSecureFile@1
|
||||
# name: testFarmPem
|
||||
# inputs:
|
||||
# secureFile: azure-test-farm.pem
|
||||
# condition: contains(variables['TOXENV'], 'test-farm')
|
||||
- name: Run tox
|
||||
env:
|
||||
AWS_ACCESS_KEY_ID: "${{ env.AWS_ACCESS_KEY_ID }}"
|
||||
AWS_SECRET_ACCESS_KEY: "${{ env.AWS_SECRET_ACCESS_KEY }}"
|
||||
AWS_EC2_PEM_FILE: "${{ env.testFarmPem_secureFilePath }}"
|
||||
run: |-
|
||||
set -e
|
||||
export TARGET_BRANCH="`echo "${BUILD_SOURCEBRANCH}" | sed -E 's!refs/(heads|tags)/!!g'`"
|
||||
[ -z "${SYSTEM_PULLREQUEST_TARGETBRANCH}" ] || export TARGET_BRANCH="${SYSTEM_PULLREQUEST_TARGETBRANCH}"
|
||||
env
|
||||
python3 -m tox run
|
||||
shell: bash
|
||||
- name: Upload coverage data
|
||||
if: env.uploadCoverage == true && (startsWith(env.TOXENV, 'cover') || startsWith(env.TOXENV, 'integration'))
|
||||
run: |-
|
||||
python3 tools/pip_install.py -I coverage
|
||||
case "${{ runner.os }}" in
|
||||
Darwin)
|
||||
CODECOV_URL="https://uploader.codecov.io/latest/macos/codecov"
|
||||
;;
|
||||
Linux)
|
||||
CODECOV_URL="https://uploader.codecov.io/latest/linux/codecov"
|
||||
;;
|
||||
Windows_NT)
|
||||
CODECOV_URL="https://uploader.codecov.io/latest/windows/codecov.exe"
|
||||
;;
|
||||
*)
|
||||
echo "Unexpected OS"
|
||||
exit 0
|
||||
esac
|
||||
curl --retry 3 -o codecov "$CODECOV_URL"
|
||||
chmod +x codecov
|
||||
coverage xml
|
||||
./codecov || echo "Uploading coverage data failed"
|
||||
shell: bash
|
||||
@@ -0,0 +1,16 @@
|
||||
name: certbot/pr-test-suite
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
- "*.x"
|
||||
env:
|
||||
uploadCoverage: true
|
||||
jobs:
|
||||
standard_tests_jobs:
|
||||
name: standard_tests_jobs
|
||||
uses: "./.github/workflows/standard_tests_jobs.yml"
|
||||
@@ -0,0 +1,51 @@
|
||||
# Environment variables defined in a calling workflow are not accessible to this reusable workflow. Refer to the documentation for further details on this limitation.
|
||||
name: standard_tests_jobs
|
||||
on:
|
||||
workflow_call:
|
||||
jobs:
|
||||
test:
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- "${{ matrix.IMAGE_NAME }}"
|
||||
env:
|
||||
PYTHON_VERSION: 3.14
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- IMAGE_NAME: macOS-15
|
||||
TOXENV: cover
|
||||
PIP_USE_PEP517: 'true'
|
||||
- IMAGE_NAME: ubuntu-22.04
|
||||
PYTHON_VERSION: 3.1
|
||||
TOXENV: oldest
|
||||
- IMAGE_NAME: ubuntu-22.04
|
||||
PYTHON_VERSION: 3.1
|
||||
TOXENV: py310
|
||||
- IMAGE_NAME: ubuntu-22.04
|
||||
TOXENV: cover
|
||||
- IMAGE_NAME: ubuntu-22.04
|
||||
TOXENV: lint-posix
|
||||
- IMAGE_NAME: ubuntu-22.04
|
||||
TOXENV: mypy
|
||||
- IMAGE_NAME: ubuntu-22.04
|
||||
TOXENV: integration
|
||||
- IMAGE_NAME: ubuntu-22.04
|
||||
TOXENV: apache_compat
|
||||
- IMAGE_NAME: ubuntu-22.04
|
||||
TOXENV: apacheconftest-with-pebble
|
||||
- IMAGE_NAME: ubuntu-22.04
|
||||
TOXENV: nginxroundtrip
|
||||
- IMAGE_NAME: ubuntu-22.04
|
||||
TOXENV: validate-changelog
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v4.1.0
|
||||
- uses: "./.github/actions/tox_steps"
|
||||
test_sphinx_builds:
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- ubuntu-22.04
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v4.1.0
|
||||
- uses: "./.github/actions/sphinx_steps"
|
||||
Reference in New Issue
Block a user