weekly_checks #90
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
# Weekly metadata check | |
name: weekly_checks | |
on: | |
schedule: | |
- cron: 0 0 * * 0 | |
env: | |
PYCURL_SSL_LIBRARY: openssl | |
jobs: | |
customerscenario_tags: | |
name: Add customerscenario tags where due | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.12] | |
env: | |
UV_CACHE_DIR: /tmp/.uv-cache | |
UV_SYSTEM_PYTHON: 1 | |
steps: | |
- name: Checkout Robottelo | |
uses: actions/checkout@v4 | |
- name: Set Up Python-${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Set up uv | |
run: curl -LsSf https://astral.sh/uv/install.sh | sh | |
- name: Restore uv cache | |
uses: actions/cache@v4 | |
with: | |
path: /tmp/.uv-cache | |
key: uv-${{ runner.os }}-${{ hashFiles('uv.lock') }} | |
restore-keys: | | |
uv-${{ runner.os }}-${{ hashFiles('uv.lock') }} | |
uv-${{ runner.os }} | |
- name: Install Dependencies | |
run: | | |
sudo apt update | |
sudo apt-get install -y libgnutls28-dev libcurl4-openssl-dev libssl-dev | |
# link vs compile time ssl implementations can break the environment when installing requirements | |
# Uninstall pycurl - its likely not installed, but in case the ubuntu-latest packages change | |
# Then compile and install it with PYCURL_SSL_LIBRARY set to openssl | |
uv pip uninstall pycurl | |
uv pip install --compile --no-cache-dir pycurl | |
uv pip install -r requirements.txt -r requirements-optional.txt | |
for conffile in conf/*.yaml.template; do mv -- "$conffile" "${conffile%.yaml.template}.yaml"; done | |
cp .env.example .env | |
- name: Minimize uv cache | |
run: uv cache prune --ci | |
- name: Customer scenario check | |
run: | | |
touch .env.md | |
echo "---" >> .env.md | |
echo "title: Add missing customerscenario tags" >> .env.md | |
echo "assignees: pondrejk " >> .env.md | |
echo "labels: Documentation" >> .env.md | |
echo "---" >> .env.md | |
echo CS_TAGS="$(make customer-scenario-check-jira)" >> .env.md | |
if grep 'The following tests need customerscenario tags' .env.md; then | |
echo "::set-output name=result::0" | |
fi | |
id: cscheck | |
env: | |
ROBOTTELO_BUGZILLA__API_KEY: ${{ secrets.BUGZILLA_KEY }} | |
ROBOTTELO_JIRA__API_KEY: ${{ secrets.JIRA_KEY }} | |
- name: Customer scenario status | |
run: | | |
cat .env.md | |
- name: Create an issue for customerscenatio tag addition | |
uses: JasonEtco/create-an-issue@v2 | |
if: ${{ env.CS_CHECK_RESULT }} | |
with: | |
filename: .env.md | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
CS_CHECK_RESULT: ${{ steps.cscheck.outputs.result}} |