Skip to content

Commit

Permalink
Release-1.7.6
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Dec 11, 2024
1 parent 7f81526 commit 9c311ba
Show file tree
Hide file tree
Showing 18 changed files with 277 additions and 1,136 deletions.
6 changes: 2 additions & 4 deletions .github/actions/generate-chart-locks/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,8 @@ runs:
with:
ref: ${{ steps.resolve.outputs.ref }}
path: temp-gen-chart-lock-repo
- name: Setting up python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Set up Python
uses: ./.github/actions/setup-python
- name: Generate lock file JSON from existing charts
working-directory: temp-gen-chart-lock-repo
id: generate-chart-locks
Expand Down
13 changes: 13 additions & 0 deletions .github/actions/setup-python/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Setup Python
description: |
Consistently installs python across this project. Should be used as a
replacement for direct calls to actions/setup-python.
Serves as the single place to update python versions over time across the
project.
runs:
using: composite
steps:
- uses: actions/setup-python@v5
with:
python-version: '3.10'
150 changes: 150 additions & 0 deletions .github/workflows/behave.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
name: Behave Testing

# Behave Testing will run the repository's Behave testing with each feature file
# getting its own runner. All feature files found within the specific path are
# included.

on:
workflow_call:
inputs:
tags:
type: string
required: true
description: |
The behave tags to use. E.g "full". Multiple tags should be specified
separated by a comma, e.g. "owners,redhat".
pr-body:
type: string
required: true
description: |
Every pull request created by this automation will have this pr-body.
behave-logging-level:
type: string
required: false
default: WARNING
description: |
Value passed to behave's --logging-level flag.
# actions/checkout related inputs used for testing. In some cases behave
# calls will use the PR branch instead of the main branch. E.g. when doing
# release testing
checkout-fetch-depth:
type: number
required: false
default: 1 # aligns with actions/checkout default.
description: |
fetch-depth flag to actions/checkout.
If setting to a pull request, caller is responsible
for verifying the user is a trusted user.
checkout-repository:
type: string
required: false
default: ""
description: |
repository flag to actions/checkout
If setting to a pull request, caller is responsible
for verifying the user is a trusted user.
checkout-ref:
type: string
required: false
default: ""
description: |
ref flag to actions/checkout
If setting to a pull request, caller is responsible
for verifying the user is a trusted user.
secrets:
# bot-name is not technically secret, but must be listed as a secret
# because you can't pass the ${{ secrets }} context as an input in the
# calling workflow, and our repos have this configured as a secret.
bot-name:
required: true
description: |
The name of the GitHub user that will send pull requests.
bot-token:
description: |
A GitHub token for the bot user that will initiate pull
requests for testing. Should NOT be set to GITHUB_TOKEN.
required: true
jobs:
get-features:
runs-on: ubuntu-latest
outputs:
features: ${{ steps.find-features.outputs.features }}
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
ref: ${{ inputs.checkout-ref }}
repository: ${{ inputs.checkout-repository }}
fetch-depth: ${{ inputs.checkout-fetch-depth }}
- name: find features
# Find the feature files currently defined in repo. We expect to find at
# least 15 files, though that number is arbitrarily chosen at a figure
# below the actual count at the time of this writing (19).
#
# The expectation is that all behave tests are expected to exist at this
# path.
id: find-features
run: |
set -e
cd tests/functional/behave_features
features=$(find . -name '*.feature' | sed -e 's%\./%%g' | jq -R -s -c 'split("\n") | del(.[] | select(length == 0))')
[ "${features}" == "" ] && { echo "The feature file variable was empty"; exit 1 ;}
echo "Found feature files: ${features}"
echo "Running sanity checks."
echo -n "File list correctly formatted into an array: "; echo "${features}" | jq --exit-status 'type == "array"'
echo -n "A sufficient number of feature files were found: "; echo "${features}" | jq --exit-status 'length > 15'
echo "Sanity checks done."
echo "features=${features}" | tee -a $GITHUB_OUTPUT
run-tests:
runs-on: ubuntu-latest
needs: [get-features]
strategy:
fail-fast: false
max-parallel: 4
matrix:
feature-file: ${{ fromJson(needs.get-features.outputs.features) }}
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
token: ${{ secrets.bot-token }}
ref: ${{ inputs.checkout-ref }}
repository: ${{ inputs.checkout-repository }}
fetch-depth: ${{ inputs.checkout-fetch-depth }}

- name: Set up Python
uses: ./.github/actions/setup-python

- name: Set up CI scripts
run: |
# set up python scripts
echo "set up python script in $PWD"
python3 -m venv ve1
cd scripts
../ve1/bin/pip3 install -r requirements.txt
../ve1/bin/pip3 install .
cd ..
# Pull request numbers are included in generated chart names in E2E, so it's included
# as an environment variable which E2E consumes.
- name: Populate PR_NUMBER environment variable
if: github.event_name == 'pull_request_target' || github.event_name == 'pull_request'
run: |
echo "PR_NUMBER=${{ github.event.pull_request.number }}" | tee $GITHUB_ENV
- name: Run Tests
env:
GITHUB_TOKEN: ${{ secrets.github-token }}
BOT_NAME: ${{ secrets.bot-name }}
BOT_TOKEN: ${{ secrets.bot-token }}
PR_BODY: ${{ inputs.pr-body }}
run: |
ve1/bin/behave tests/functional/behave_features/ \
--include ${{ matrix.feature-file }} \
--tags=${{ inputs.tags }} \
--logging-level=${{ inputs.behave-logging-level }} \
--no-capture \
--no-color
18 changes: 6 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python 3.x Part 1
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Set up Python
uses: ./.github/actions/setup-python

- name: Set up Python 3.x Part 2
run: |
Expand Down Expand Up @@ -123,10 +121,8 @@ jobs:
repository: ${{ github.event.pull_request.head.repo.full_name }}
path: "pr-branch"

- name: Set up Python 3.x Part 1
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Set up Python
uses: ./.github/actions/setup-python

- name: Set up Python 3.x Part 2
run: |
Expand Down Expand Up @@ -428,10 +424,8 @@ jobs:
repository: ${{ github.event.pull_request.head.repo.full_name }}
path: "pr-branch"

- name: Set up Python 3.x Part 1
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Set up Python
uses: ./.github/actions/setup-python

- name: Set up Python 3.x Part 2
run: |
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/check-contributor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ jobs:
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
uses: ./.github/actions/setup-python

- name: Install CI Scripts
run: |
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/check-locks-on-owners-submission.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,8 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python 3.x Part 1
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Set up Python
uses: ./.github/actions/setup-python

- name: Set up Python 3.x Part 2
run: |
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/lock-sanity-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,8 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v4
- name: Set up Python 3.x Part 1
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Set up Python
uses: ./.github/actions/setup-python
- name: Set up Python 3.x Part 2
run: |
# set up python
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/mercury_bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,8 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python 3.x Part 1
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Set up Python
uses: ./.github/actions/setup-python

- name: Set up Python 3.x Part 2
run: |
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/owners-redhat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,7 @@ jobs:
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
uses: ./.github/actions/setup-python

- name: Install Python CI tooling
working-directory: scripts
Expand Down Expand Up @@ -83,9 +81,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
uses: ./.github/actions/setup-python
- name: Install Python CI tooling
working-directory: scripts
run: |
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/owners.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python 3.x Part 1
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Set up Python
uses: ./.github/actions/setup-python

- name: Set up Python 3.x Part 2
run: |
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/python-style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python 3.x Part 1
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Set up Python
uses: ./.github/actions/setup-python
- name: Install style tooling
working-directory: scripts
run: make venv.codestyle
Expand Down
Loading

0 comments on commit 9c311ba

Please sign in to comment.