switch extended tests to new format; remove setup_tox and run_tox actions

This commit is contained in:
Erica Portnoy
2026-04-17 13:23:02 -07:00
parent 0c93b29d8a
commit fbeabd4dcf
5 changed files with 11 additions and 118 deletions
-41
View File
@@ -1,41 +0,0 @@
name: Run tox
inputs:
AWS_ACCESS_KEY_ID:
description: 'access key ID for AWS'
AWS_SECRET_ACCESS_KEY:
description: 'access key for AWS'
AWS_TEST_FARM_PEM:
description: 'contents of AWS PEM file to be placed in $AWS_EC2_PEM_FILE from environment'
PIP_USE_PEP517:
description: 'a pip flag'
TOXENV:
description: 'the tox environment to run'
CFLAGS:
description: 'needed to help pip find augeas headers on mac'
runs:
using: composite
steps:
- name: Create test farm pem file
if: contains(inputs.TOXENV, 'test-farm')
env:
PEM_CONTENTS: "${{ inputs.AWS_TEST_FARM_PEM }}"
run: |-
set -e
echo "${PEM_CONTENTS}" >> $AWS_EC2_PEM_FILE
shell: bash
- name: Run tox
env:
AWS_ACCESS_KEY_ID: "${{ inputs.AWS_ACCESS_KEY_ID }}"
AWS_SECRET_ACCESS_KEY: "${{ inputs.AWS_SECRET_ACCESS_KEY }}"
PIP_USE_PEP517: "${{ inputs.PIP_USE_PEP517 }}"
TOXENV: "${{ inputs.TOXENV }}"
CFLAGS: "${{ inputs.CFLAGS }}"
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
-52
View File
@@ -1,52 +0,0 @@
name: Setup tox
inputs:
AWS_TEST_FARM_PEM:
description: 'Contents of keyfile for AWS'
AWS_EC2_PEM_FILE:
description: 'Location of keyfile for AWS'
PYTHON_VERSION:
description: 'Python version to run tests with'
required: true
runs:
using: composite
steps:
# We run brew update because we've seen attempts to install an older version
# of a package fail. See
# https://github.com/actions/virtual-environments/issues/3165.
#
# We untap homebrew/core and homebrew/cask and unset HOMEBREW_NO_INSTALL_FROM_API (which
# is maybe set by the CI macOS env) because GitHub has been having issues, making these jobs
# fail on git clones: https://github.com/orgs/Homebrew/discussions/4612.
- name: Install MacOS dependencies
if: runner.os == 'macOS'
run: |-
set -e
unset HOMEBREW_NO_INSTALL_FROM_API
brew untap homebrew/core homebrew/cask
brew update
brew install augeas
BREW_PREFIX=$(brew --prefix)
CFLAGS="$CFLAGS -I$BREW_PREFIX/include -L$BREW_PREFIX/lib"
echo "CFLAGS=$CFLAGS" >> $GITHUB_OUTPUT
shell: bash
- name: Install Linux dependencies
if: runner.os == 'Linux'
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@v6.2.0
with:
python-version: "${{ inputs.PYTHON_VERSION }}"
- name: Install runtime dependencies
run: |-
set -e
python3 tools/pip_install.py tox
shell: bash
+7 -24
View File
@@ -5,13 +5,8 @@ on:
jobs:
test:
name: extended_test ${{ matrix.TOXENV }} ${{ matrix.PYTHON_VERSION }}
permissions:
contents: read
runs-on:
- 'ubuntu-22.04'
env:
uploadCoverage: ${{ inputs.uploadCoverage }}
strategy:
fail-fast: false
matrix:
@@ -45,22 +40,10 @@ jobs:
TOXENV: integration-dns-rfc2136
- PYTHON_VERSION: '3.12'
TOXENV: test-farm-apache2
steps:
- name: Checkout
uses: actions/checkout@v6.0.2
- name: Setup tox
uses: "./.github/actions/setup_tox"
with:
PYTHON_VERSION: "${{ matrix.PYTHON_VERSION }}"
- name: Run tox
uses: "./.github/actions/run_tox"
env:
AWS_EC2_PEM_FILE: ${{ github.workspace }}/GHAKeyPair.pem
with:
AWS_ACCESS_KEY_ID: "${{ secrets.AWS_ACCESS_KEY_ID }}"
AWS_SECRET_ACCESS_KEY: "${{ secrets.AWS_SECRET_ACCESS_KEY }}"
AWS_TEST_FARM_PEM: "${{ secrets.AWS_TEST_FARM_PEM }}"
PIP_USE_PEP517: "${{ matrix.PIP_USE_PEP517 }}"
TOXENV: "${{ matrix.TOXENV }}"
- name: Upload coverage
uses: "./.github/actions/upload_coverage"
uses: "./.github/workflows/tox_steps.yml"
with:
PYTHON_VERSION: "${{ matrix.PYTHON_VERSION }}"
TOXENV: "${{ matrix.TOXENV }}"
uploadCoverage: "${{ inputs.uploadCoverage }}"
IMAGE_NAME: "${{ matrix.IMAGE_NAME }}"
test_name: "extended_test"
+1 -1
View File
@@ -9,7 +9,6 @@ on:
default: false
jobs:
test:
name: test ${{ inputs.IMAGE_NAME }}-${{ inputs.TOXENV }}
permissions:
contents: read
strategy:
@@ -44,6 +43,7 @@ jobs:
TOXENV: "${{ matrix.TOXENV }}"
uploadCoverage: "${{ inputs.uploadCoverage }}"
IMAGE_NAME: "${{ matrix.IMAGE_NAME }}"
test_name: "test"
test_sphinx_builds:
permissions:
contents: read
+3
View File
@@ -23,12 +23,15 @@ on:
AWS_TEST_FARM_PEM:
description: 'contents of AWS PEM file to be placed in $AWS_EC2_PEM_FILE from environment'
type: string
test_name:
type: string
env:
uploadCoverage: ${{ inputs.uploadCoverage }}
jobs:
tox_all:
name: ${{ inputs.test_name }} ${{ inputs.IMAGE_NAME }}-${{ inputs.TOXENV }}
runs-on:
- "${{ inputs.IMAGE_NAME }}"
steps: