From 8698b38568c137405a9ffaa11cb70ffb48b3c36d Mon Sep 17 00:00:00 2001 From: Bruno Rocha Date: Thu, 3 Oct 2024 15:47:19 +0100 Subject: [PATCH 1/4] [ci] trying to add junit reports to actions annotations --- .github/workflows/ci_full.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/ci_full.yml b/.github/workflows/ci_full.yml index b882fc423b..c23d1eaed8 100644 --- a/.github/workflows/ci_full.yml +++ b/.github/workflows/ci_full.yml @@ -85,6 +85,21 @@ jobs: "${{ vars.PDE_ORG_RESULTS_AGGREGATOR_UPLOAD_URL }}/api/results/upload/"' + - name: Copy Junit file from container to local + if: always() + continue-on-error: true + run: >- + docker cp pulp:/tmp/galaxy_ng-test-results.xml junit.xml + + - name: Publish Local Junit Test Results + uses: EnricoMi/publish-unit-test-result-action@v1 + continue-on-error: true + if: always() + with: + files: junit.xml + check_name: Test Results (Python ${{ matrix.python-version }}) + + # FIXME: do we really care about these anymore ... ? #- name: run the functional test playbook # run: cd dev/playbooks; ANSIBLE_STDOUT_CALLBACK=yaml ansible-playbook -i 'localhost,' --forks=1 -v run_functional_tests.yaml From 240b50cd8f7ace47a3933512fd97bdcc74b2db8c Mon Sep 17 00:00:00 2001 From: Bruno Rocha Date: Thu, 3 Oct 2024 16:11:47 +0100 Subject: [PATCH 2/4] Attempt 2 --- .github/workflows/ci_full.yml | 12 +++--- .../workflows/publish_local_junit_results.yml | 37 +++++++++++++++++++ galaxy_ng/tests/unit/test_models.py | 1 + 3 files changed, 43 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/publish_local_junit_results.yml diff --git a/.github/workflows/ci_full.yml b/.github/workflows/ci_full.yml index c23d1eaed8..36aafbb3d9 100644 --- a/.github/workflows/ci_full.yml +++ b/.github/workflows/ci_full.yml @@ -84,21 +84,19 @@ jobs: --form "git_repository_url=https://github.com/${{ github.repository }}" "${{ vars.PDE_ORG_RESULTS_AGGREGATOR_UPLOAD_URL }}/api/results/upload/"' - - name: Copy Junit file from container to local if: always() continue-on-error: true run: >- docker cp pulp:/tmp/galaxy_ng-test-results.xml junit.xml - - name: Publish Local Junit Test Results - uses: EnricoMi/publish-unit-test-result-action@v1 - continue-on-error: true + - name: Upload Test Results if: always() + uses: actions/upload-artifact@v2 with: - files: junit.xml - check_name: Test Results (Python ${{ matrix.python-version }}) - + name: Unit Test Results + path: | + junit.xml # FIXME: do we really care about these anymore ... ? #- name: run the functional test playbook diff --git a/.github/workflows/publish_local_junit_results.yml b/.github/workflows/publish_local_junit_results.yml new file mode 100644 index 0000000000..962791b91c --- /dev/null +++ b/.github/workflows/publish_local_junit_results.yml @@ -0,0 +1,37 @@ +name: Local Unit Test Results + +on: + workflow_run: + workflows: ["CI"] + types: + - completed + +jobs: + unit-test-results: + name: Unit Test Results + runs-on: ubuntu-latest + if: github.event.workflow_run.conclusion != 'skipped' + + steps: + - name: Download and Extract Artifacts + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + run: | + mkdir -p artifacts && cd artifacts + + artifacts_url=${{ github.event.workflow_run.artifacts_url }} + + gh api "$artifacts_url" -q '.artifacts[] | [.name, .archive_download_url] | @tsv' | while read artifact + do + IFS=$'\t' read name url <<< "$artifact" + gh api $url > "$name.zip" + unzip -d "$name" "$name.zip" + done + + - name: Publish Unit Test Results + uses: EnricoMi/publish-unit-test-result-action@v1 + with: + commit: ${{ github.event.workflow_run.head_sha }} + event_file: artifacts/Event File/event.json + event_name: ${{ github.event.workflow_run.event }} + files: "artifacts/junit.xml" diff --git a/galaxy_ng/tests/unit/test_models.py b/galaxy_ng/tests/unit/test_models.py index 6fa3d7d7f4..75ea394748 100644 --- a/galaxy_ng/tests/unit/test_models.py +++ b/galaxy_ng/tests/unit/test_models.py @@ -13,6 +13,7 @@ class TestSignalCreateRepository(TestCase): def test_create_repository_ensure_retain_repo_versions(self): """On creation retain_repo_versions is set to 1 if omited""" + assert 1 == 0 repo_name = "test" repository = AnsibleRepository.objects.create(name=repo_name) self.assertEqual(repository.name, repo_name) From 052b4785e902528eca2a1b3345a35163251550e3 Mon Sep 17 00:00:00 2001 From: Bruno Rocha Date: Thu, 3 Oct 2024 16:18:14 +0100 Subject: [PATCH 3/4] here we go again --- .github/workflows/backported-labels.yml | 64 +++--- .github/workflows/build_publish.yml | 160 +++++++-------- .../ci_automation_hub_collection.yml | 182 +++++++++--------- .github/workflows/ci_full.yml | 13 +- .github/workflows/ci_oci-env-integration.yml | 138 ++++++------- .github/workflows/ci_tdd.yml | 58 +++--- .github/workflows/i18n.yml | 166 ++++++++-------- .github/workflows/labeler.yml | 42 ++-- .../workflows/publish_local_junit_results.yml | 2 +- 9 files changed, 418 insertions(+), 407 deletions(-) diff --git a/.github/workflows/backported-labels.yml b/.github/workflows/backported-labels.yml index 92a6e2de6e..0e449c94f4 100644 --- a/.github/workflows/backported-labels.yml +++ b/.github/workflows/backported-labels.yml @@ -1,32 +1,32 @@ -name: 'Add backported-* labels' - -on: - # allow running manually - workflow_dispatch: - push: - branches: [ 'stable-*' ] - -jobs: - labels: - runs-on: ubuntu-latest - steps: - - name: 'Set $LABEL from branch name' - run: | - VERSION=`sed 's/^refs\/heads\/stable-//' <<< $GITHUB_REF` - LABEL="backported-${VERSION}" - echo "LABEL=${LABEL}" >> $GITHUB_ENV - - - uses: actions/checkout@v4 - - - name: 'Set $PR to PR number' - run: | - git log -1 --oneline - echo PR=`git log -1 --oneline | perl -ne 'print if s/^.*?\(#(\d+)\).*\(#\d+\).*$/$1/'` >> $GITHUB_ENV - - - name: "Add ${{ env.LABEL }} to #${{ env.PR }}" - if: ${{ env.PR }} - uses: actions-ecosystem/action-add-labels@v1 - with: - labels: ${{ env.LABEL }} - number: ${{ env.PR }} - github_token: ${{ secrets.GITHUB_TOKEN }} +# name: 'Add backported-* labels' +# +# on: +# # allow running manually +# workflow_dispatch: +# push: +# branches: [ 'stable-*' ] +# +# jobs: +# labels: +# runs-on: ubuntu-latest +# steps: +# - name: 'Set $LABEL from branch name' +# run: | +# VERSION=`sed 's/^refs\/heads\/stable-//' <<< $GITHUB_REF` +# LABEL="backported-${VERSION}" +# echo "LABEL=${LABEL}" >> $GITHUB_ENV +# +# - uses: actions/checkout@v4 +# +# - name: 'Set $PR to PR number' +# run: | +# git log -1 --oneline +# echo PR=`git log -1 --oneline | perl -ne 'print if s/^.*?\(#(\d+)\).*\(#\d+\).*$/$1/'` >> $GITHUB_ENV +# +# - name: "Add ${{ env.LABEL }} to #${{ env.PR }}" +# if: ${{ env.PR }} +# uses: actions-ecosystem/action-add-labels@v1 +# with: +# labels: ${{ env.LABEL }} +# number: ${{ env.PR }} +# github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/build_publish.yml b/.github/workflows/build_publish.yml index ae4dc7a08c..73eb73a16a 100644 --- a/.github/workflows/build_publish.yml +++ b/.github/workflows/build_publish.yml @@ -1,80 +1,80 @@ ---- -name: "Build and publish galaxy_ng package" - -on: - release: - types: [published] - tags: - - '*' - branches: - - 'stable-*' - -jobs: - - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Set up Python - uses: actions/setup-python@v4 - - - name: Get galaxy_ng package version - shell: bash - run: echo "galaxy_ng_version=$(python3 setup.py --version)" >> $GITHUB_ENV - - - name: Validate tag and galaxy_ng version match - shell: bash - if: env.galaxy_ng_version != github.ref_name - run: | - echo "::error::Tag ${{ github.ref_name }} and galaxy_ng version ${{ env.galaxy_ng_version }} doesn't match." - exit 1 - - - name: Update apt - run: sudo apt -y update - - - name: Install LDAP requirements - run: sudo apt-get install -y libsasl2-dev libldap2-dev libssl-dev build-essential gettext python-setuptools - - - name: Upgrade pip - run: pip install pip --upgrade - - - name: Install galaxy_ng editable - run: pip install -e . - - # set variable for the next step, so only versions higher than 4.4 gets translated - # 4.2 and 4.3 don't support translations - - name: Check galaxy_ng version for translations - shell: bash - id: version_check - run: | - is_translatable=$(python -c 'from pkg_resources import parse_version; cmp_res = parse_version("${{ env.galaxy_ng_version }}") >= parse_version("4.4"); print(cmp_res)') - echo "is_translatable=$is_translatable" >> $GITHUB_OUTPUT - - - name: Build API translations - shell: bash - run: "django-admin compilemessages" - if: steps.version_check.outputs.is_translatable == 'True' - - - name: Check if UI has corresponding tag - shell: bash - run: | - status_code=$(curl -LI https://api.github.com/repos/ansible/ansible-hub-ui/releases/tags/${{ env.galaxy_ng_version }} -o /dev/null -w '%{http_code}\n' -s) - if [ $status_code == "404" ] - then - echo "::error::Corresponding tag ${{ env.galaxy_ng_version }} for ansible-hub-ui not found." - exit 1 - fi - - - name: Build galaxy_ng python packages - run: "python3 setup.py sdist bdist_wheel" - - - name: Install twine - run: "pip install twine" - - - name: Publish galaxy_ng to PyPI - run: "python3 -m twine upload dist/*" - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.PYPI_RELEASE_TOKEN }} +# --- +# name: "Build and publish galaxy_ng package" +# +# on: +# release: +# types: [published] +# tags: +# - '*' +# branches: +# - 'stable-*' +# +# jobs: +# +# build: +# runs-on: ubuntu-latest +# +# steps: +# - uses: actions/checkout@v4 +# +# - name: Set up Python +# uses: actions/setup-python@v4 +# +# - name: Get galaxy_ng package version +# shell: bash +# run: echo "galaxy_ng_version=$(python3 setup.py --version)" >> $GITHUB_ENV +# +# - name: Validate tag and galaxy_ng version match +# shell: bash +# if: env.galaxy_ng_version != github.ref_name +# run: | +# echo "::error::Tag ${{ github.ref_name }} and galaxy_ng version ${{ env.galaxy_ng_version }} doesn't match." +# exit 1 +# +# - name: Update apt +# run: sudo apt -y update +# +# - name: Install LDAP requirements +# run: sudo apt-get install -y libsasl2-dev libldap2-dev libssl-dev build-essential gettext python-setuptools +# +# - name: Upgrade pip +# run: pip install pip --upgrade +# +# - name: Install galaxy_ng editable +# run: pip install -e . +# +# # set variable for the next step, so only versions higher than 4.4 gets translated +# # 4.2 and 4.3 don't support translations +# - name: Check galaxy_ng version for translations +# shell: bash +# id: version_check +# run: | +# is_translatable=$(python -c 'from pkg_resources import parse_version; cmp_res = parse_version("${{ env.galaxy_ng_version }}") >= parse_version("4.4"); print(cmp_res)') +# echo "is_translatable=$is_translatable" >> $GITHUB_OUTPUT +# +# - name: Build API translations +# shell: bash +# run: "django-admin compilemessages" +# if: steps.version_check.outputs.is_translatable == 'True' +# +# - name: Check if UI has corresponding tag +# shell: bash +# run: | +# status_code=$(curl -LI https://api.github.com/repos/ansible/ansible-hub-ui/releases/tags/${{ env.galaxy_ng_version }} -o /dev/null -w '%{http_code}\n' -s) +# if [ $status_code == "404" ] +# then +# echo "::error::Corresponding tag ${{ env.galaxy_ng_version }} for ansible-hub-ui not found." +# exit 1 +# fi +# +# - name: Build galaxy_ng python packages +# run: "python3 setup.py sdist bdist_wheel" +# +# - name: Install twine +# run: "pip install twine" +# +# - name: Publish galaxy_ng to PyPI +# run: "python3 -m twine upload dist/*" +# env: +# TWINE_USERNAME: __token__ +# TWINE_PASSWORD: ${{ secrets.PYPI_RELEASE_TOKEN }} diff --git a/.github/workflows/ci_automation_hub_collection.yml b/.github/workflows/ci_automation_hub_collection.yml index 5bc5cda8ca..25c6143012 100644 --- a/.github/workflows/ci_automation_hub_collection.yml +++ b/.github/workflows/ci_automation_hub_collection.yml @@ -1,91 +1,91 @@ ---- -name: Galaxy Collection CI -on: - pull_request: - branches: - - "*" - paths-ignore: - - "CHANGES/**" - - "docs/**" - - "mkdocs.yml" - push: - branches: - - "*" - workflow_dispatch: - -jobs: - galaxy_collection: - runs-on: ubuntu-latest - steps: - - name: Checkout galaxy_ng - uses: actions/checkout@v4 - - - name: Setup python - uses: actions/setup-python@v4 - with: - python-version: "3.11" - - - name: (Linux) Install docker compose - run: | - curl -L -o /tmp/docker-compose https://github.com/docker/compose/releases/download/v2.29.1/docker-compose-linux-x86_64 - install /tmp/docker-compose /usr/local/bin/ - - - name: install ansible - run: pip3 install ansible - - - name: Checkout the ansible_hub collection - uses: actions/checkout@v4 - with: - repository: ansible-collections/ansible_hub - path: ansible_hub - - - name: copy galaxy.yml.j2 to ansible_hub - run: | - cp dev/galaxy_collection_plays/galaxy.yml.j2 ansible_hub - - - name: Build and install the collection - working-directory: ansible_hub - run: | - # The ansible.cfg defined in the collection repository might break the test. We want the same variables for installation and running. - rm -f ansible.cfg - rm -f galaxy.yml - ansible all -i localhost, -c local -m template -a "src=galaxy.yml.j2 dest=galaxy.yml" -e collection_namespace=ansible -e collection_name=hub -e collection_version=1.0.0 -e collection_repo=https://github.com/ansible-collections/ansible_hub - ansible-galaxy collection build -vvv - ansible-galaxy collection install ansible-hub-1.0.0.tar.gz -vvv - - - name: set env vars - run: | - echo "OCI_ENV_PATH=${HOME}/work/galaxy_ng/oci_env" >> $GITHUB_ENV - echo "COMPOSE_INTERACTIVE_NO_CLI=1" >> $GITHUB_ENV - echo "OCI_VERBOSE=1" >> $GITHUB_ENV - echo "GH_DUMP_LOGS=0" >> $GITHUB_ENV - - - name: setup oci-env - run: | - git clone https://github.com/pulp/oci_env.git $OCI_ENV_PATH - pip install -e $OCI_ENV_PATH/client/ - mkdir $OCI_ENV_PATH/db_backup/ - - - name: run the standalone stack detached - run: OCI_COMPOSE_DETACH=1 make oci/standalone - - - name: wait for the system to start - run: make oci/standalone/poll - - - name: create the test users+data - run: docker exec -t ci-standalone-pulp-1 bash -c 'cd /src/galaxy_ng; django-admin shell < ./dev/common/setup_test_data.py' - - - name: make messages - run: docker exec -t ci-standalone-pulp-1 bash -c 'cd /src/galaxy_ng/galaxy_ng; django-admin makemessages --all' - - - name: Test the user playbook - run: ansible-playbook dev/galaxy_collection_plays/user.yml -vvv - - - name: Test the content playbook - run: ansible-playbook dev/galaxy_collection_plays/content.yml -vvv - - - name: Test the repo playbook - run: ansible-playbook dev/galaxy_collection_plays/repo.yml -vvv - - - name: Test the ee playbook - run: ansible-playbook dev/galaxy_collection_plays/ee.yml -vvv +# --- +# name: Galaxy Collection CI +# on: +# pull_request: +# branches: +# - "*" +# paths-ignore: +# - "CHANGES/**" +# - "docs/**" +# - "mkdocs.yml" +# push: +# branches: +# - "*" +# workflow_dispatch: +# +# jobs: +# galaxy_collection: +# runs-on: ubuntu-latest +# steps: +# - name: Checkout galaxy_ng +# uses: actions/checkout@v4 +# +# - name: Setup python +# uses: actions/setup-python@v4 +# with: +# python-version: "3.11" +# +# - name: (Linux) Install docker compose +# run: | +# curl -L -o /tmp/docker-compose https://github.com/docker/compose/releases/download/v2.29.1/docker-compose-linux-x86_64 +# install /tmp/docker-compose /usr/local/bin/ +# +# - name: install ansible +# run: pip3 install ansible +# +# - name: Checkout the ansible_hub collection +# uses: actions/checkout@v4 +# with: +# repository: ansible-collections/ansible_hub +# path: ansible_hub +# +# - name: copy galaxy.yml.j2 to ansible_hub +# run: | +# cp dev/galaxy_collection_plays/galaxy.yml.j2 ansible_hub +# +# - name: Build and install the collection +# working-directory: ansible_hub +# run: | +# # The ansible.cfg defined in the collection repository might break the test. We want the same variables for installation and running. +# rm -f ansible.cfg +# rm -f galaxy.yml +# ansible all -i localhost, -c local -m template -a "src=galaxy.yml.j2 dest=galaxy.yml" -e collection_namespace=ansible -e collection_name=hub -e collection_version=1.0.0 -e collection_repo=https://github.com/ansible-collections/ansible_hub +# ansible-galaxy collection build -vvv +# ansible-galaxy collection install ansible-hub-1.0.0.tar.gz -vvv +# +# - name: set env vars +# run: | +# echo "OCI_ENV_PATH=${HOME}/work/galaxy_ng/oci_env" >> $GITHUB_ENV +# echo "COMPOSE_INTERACTIVE_NO_CLI=1" >> $GITHUB_ENV +# echo "OCI_VERBOSE=1" >> $GITHUB_ENV +# echo "GH_DUMP_LOGS=0" >> $GITHUB_ENV +# +# - name: setup oci-env +# run: | +# git clone https://github.com/pulp/oci_env.git $OCI_ENV_PATH +# pip install -e $OCI_ENV_PATH/client/ +# mkdir $OCI_ENV_PATH/db_backup/ +# +# - name: run the standalone stack detached +# run: OCI_COMPOSE_DETACH=1 make oci/standalone +# +# - name: wait for the system to start +# run: make oci/standalone/poll +# +# - name: create the test users+data +# run: docker exec -t ci-standalone-pulp-1 bash -c 'cd /src/galaxy_ng; django-admin shell < ./dev/common/setup_test_data.py' +# +# - name: make messages +# run: docker exec -t ci-standalone-pulp-1 bash -c 'cd /src/galaxy_ng/galaxy_ng; django-admin makemessages --all' +# +# - name: Test the user playbook +# run: ansible-playbook dev/galaxy_collection_plays/user.yml -vvv +# +# - name: Test the content playbook +# run: ansible-playbook dev/galaxy_collection_plays/content.yml -vvv +# +# - name: Test the repo playbook +# run: ansible-playbook dev/galaxy_collection_plays/repo.yml -vvv +# +# - name: Test the ee playbook +# run: ansible-playbook dev/galaxy_collection_plays/ee.yml -vvv diff --git a/.github/workflows/ci_full.yml b/.github/workflows/ci_full.yml index 36aafbb3d9..2de7aacab2 100644 --- a/.github/workflows/ci_full.yml +++ b/.github/workflows/ci_full.yml @@ -48,6 +48,17 @@ jobs: - name: Check for gettext problems run: sh .ci/scripts/check_gettext.sh + + event_file: + name: "Event File" + runs-on: ubuntu-latest + steps: + - name: Upload + uses: actions/upload-artifact@v4 + with: + name: Event File + path: ${{ github.event_path }} + test: runs-on: ubuntu-latest steps: @@ -92,7 +103,7 @@ jobs: - name: Upload Test Results if: always() - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: Unit Test Results path: | diff --git a/.github/workflows/ci_oci-env-integration.yml b/.github/workflows/ci_oci-env-integration.yml index 45e6d3b654..75c5a5f1ab 100644 --- a/.github/workflows/ci_oci-env-integration.yml +++ b/.github/workflows/ci_oci-env-integration.yml @@ -1,69 +1,69 @@ ---- -name: OCI Env Integration -on: - pull_request: - branches: - - '**' - push: - branches: - - '**' - workflow_dispatch: - -jobs: - integration: - strategy: - fail-fast: false - matrix: - env: - - TEST_PROFILE: ldap - - TEST_PROFILE: keycloak - - TEST_PROFILE: standalone - # - TEST_PROFILE: rbac - - TEST_PROFILE: rbac_parallel_group_1 - - TEST_PROFILE: rbac_parallel_group_2 - - TEST_PROFILE: certified-sync - - TEST_PROFILE: insights - - TEST_PROFILE: iqe_rbac - - TEST_PROFILE: x_repo_search - - TEST_PROFILE: community - - TEST_PROFILE: dab_jwt - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - - name: (Linux) Install docker compose - run: | - curl -L -o /tmp/docker-compose https://github.com/docker/compose/releases/download/v2.29.1/docker-compose-linux-x86_64 - install /tmp/docker-compose /usr/local/bin/ - - # Note: COMPOSE_INTERACTIVE_NO_CLI=1 is required for oci-env to work correctly when there's no interactive terminal - - name: Set environment variables - run: | - echo "OCI_ENV_PATH=${HOME}/work/galaxy_ng/oci_env" >> $GITHUB_ENV - echo "COMPOSE_INTERACTIVE_NO_CLI=1" >> $GITHUB_ENV - echo "OCI_VERBOSE=1" >> $GITHUB_ENV - echo "GH_DUMP_LOGS=1" >> $GITHUB_ENV - - - name: Update apt - run: sudo apt -y update - - - name: Install LDAP requirements - run: sudo apt-get install -y libsasl2-dev python3 libldap2-dev libssl-dev build-essential - - - name: setup oci-env - run: | - git clone https://github.com/pulp/oci_env.git $OCI_ENV_PATH - pip install -e $OCI_ENV_PATH/client/ - mkdir $OCI_ENV_PATH/db_backup/ - - - name: run integration tests - if: ${{ !startsWith(matrix.env.TEST_PROFILE, 'rbac_parallel_group') }} - run: make gh-action/${{ matrix.env.TEST_PROFILE }} - - - name: run parallel rbac integration tests - if: ${{ startsWith(matrix.env.TEST_PROFILE, 'rbac_parallel_group') }} - run: make gh-action/rbac-parallel RBAC_PARALLEL_GROUP=${{ matrix.env.TEST_PROFILE }} +# --- +# name: OCI Env Integration +# on: +# pull_request: +# branches: +# - '**' +# push: +# branches: +# - '**' +# workflow_dispatch: +# +# jobs: +# integration: +# strategy: +# fail-fast: false +# matrix: +# env: +# - TEST_PROFILE: ldap +# - TEST_PROFILE: keycloak +# - TEST_PROFILE: standalone +# # - TEST_PROFILE: rbac +# - TEST_PROFILE: rbac_parallel_group_1 +# - TEST_PROFILE: rbac_parallel_group_2 +# - TEST_PROFILE: certified-sync +# - TEST_PROFILE: insights +# - TEST_PROFILE: iqe_rbac +# - TEST_PROFILE: x_repo_search +# - TEST_PROFILE: community +# - TEST_PROFILE: dab_jwt +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v4 +# +# - uses: actions/setup-python@v4 +# with: +# python-version: "3.10" +# +# - name: (Linux) Install docker compose +# run: | +# curl -L -o /tmp/docker-compose https://github.com/docker/compose/releases/download/v2.29.1/docker-compose-linux-x86_64 +# install /tmp/docker-compose /usr/local/bin/ +# +# # Note: COMPOSE_INTERACTIVE_NO_CLI=1 is required for oci-env to work correctly when there's no interactive terminal +# - name: Set environment variables +# run: | +# echo "OCI_ENV_PATH=${HOME}/work/galaxy_ng/oci_env" >> $GITHUB_ENV +# echo "COMPOSE_INTERACTIVE_NO_CLI=1" >> $GITHUB_ENV +# echo "OCI_VERBOSE=1" >> $GITHUB_ENV +# echo "GH_DUMP_LOGS=1" >> $GITHUB_ENV +# +# - name: Update apt +# run: sudo apt -y update +# +# - name: Install LDAP requirements +# run: sudo apt-get install -y libsasl2-dev python3 libldap2-dev libssl-dev build-essential +# +# - name: setup oci-env +# run: | +# git clone https://github.com/pulp/oci_env.git $OCI_ENV_PATH +# pip install -e $OCI_ENV_PATH/client/ +# mkdir $OCI_ENV_PATH/db_backup/ +# +# - name: run integration tests +# if: ${{ !startsWith(matrix.env.TEST_PROFILE, 'rbac_parallel_group') }} +# run: make gh-action/${{ matrix.env.TEST_PROFILE }} +# +# - name: run parallel rbac integration tests +# if: ${{ startsWith(matrix.env.TEST_PROFILE, 'rbac_parallel_group') }} +# run: make gh-action/rbac-parallel RBAC_PARALLEL_GROUP=${{ matrix.env.TEST_PROFILE }} diff --git a/.github/workflows/ci_tdd.yml b/.github/workflows/ci_tdd.yml index 83fb490563..ab41a61306 100644 --- a/.github/workflows/ci_tdd.yml +++ b/.github/workflows/ci_tdd.yml @@ -1,29 +1,29 @@ ---- -name: TDD -on: - pull_request: - branches: - - '*' - workflow_dispatch: - -jobs: - - validation: - runs-on: ubuntu-latest - steps: - - - uses: actions/setup-python@v4 - with: - python-version: "3.8" - - - uses: actions/checkout@v4 - - - name: Ensure changes were made to tests - env: - PY_COLORS: '1' - GITHUB_PR_NUMBER: ${{github.event.number}} - GITHUB_BASE_REF: ${{ github.base_ref }} - GITHUB_BRANCH: ${{ github.head_ref }} - GITHUB_USER: ${{ github.event.pull_request.user.login }} - GITHUB_CONTEXT: ${{ toJson(github) }} - run: python dev/common/tdd.py +# --- +# name: TDD +# on: +# pull_request: +# branches: +# - '*' +# workflow_dispatch: +# +# jobs: +# +# validation: +# runs-on: ubuntu-latest +# steps: +# +# - uses: actions/setup-python@v4 +# with: +# python-version: "3.8" +# +# - uses: actions/checkout@v4 +# +# - name: Ensure changes were made to tests +# env: +# PY_COLORS: '1' +# GITHUB_PR_NUMBER: ${{github.event.number}} +# GITHUB_BASE_REF: ${{ github.base_ref }} +# GITHUB_BRANCH: ${{ github.head_ref }} +# GITHUB_USER: ${{ github.event.pull_request.user.login }} +# GITHUB_CONTEXT: ${{ toJson(github) }} +# run: python dev/common/tdd.py diff --git a/.github/workflows/i18n.yml b/.github/workflows/i18n.yml index 452947fc1a..8774ce0574 100644 --- a/.github/workflows/i18n.yml +++ b/.github/workflows/i18n.yml @@ -1,83 +1,83 @@ ---- -name: "[i18n] Update translations" - -on: - # allow running manually - workflow_dispatch: - # run weekly - schedule: - - cron: '30 5 1 * *' - -jobs: - i18n: - runs-on: ubuntu-latest - - strategy: - matrix: - branch: - - 'master' - - 'stable-4.9' - - 'stable-4.10' - - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ matrix.branch }} - - - name: Set up Python - uses: actions/setup-python@v4 - - - name: Update apt - run: sudo apt -y update - - - name: Install LDAP requirements - run: sudo apt-get install -y libsasl2-dev libldap2-dev libssl-dev build-essential gettext python-setuptools - - - name: Upgrade pip - run: pip install pip --upgrade - - - name: Install galaxy_ng editable - run: pip install -e . - - - name: Extract strings - run: | - cd galaxy_ng - django-admin makemessages --all - - - name: Check if files were updated - run: | - filesChanged=$(git diff --ignore-matching-lines=POT-Creation-Date) - if [ -z "$filesChanged" ] - then - echo "openPR=false" >> $GITHUB_ENV - else - echo "openPR=true" >> $GITHUB_ENV - fi - shell: bash - - - name: Clear fuzzy entries - run: bash .github/workflows/scripts/clear_fuzzy_entries.sh - - - name: Compile strings - run: | - cd galaxy_ng - django-admin compilemessages - - - name: Set current date as env variable - run: echo "NOW=$(date +'%Y-%m-%d')" >> $GITHUB_ENV - - - name: Create a Pull Request (only if files were updated) - if: env.openPR == 'true' - uses: peter-evans/create-pull-request@v5 - with: - token: ${{ secrets.GITHUB_TOKEN }} - committer: ansible - author: ansible - commit-message: | - Automated updated of i18n strings on ${{ env.NOW }} - No-Issue - body: | - No-Issue - title: "[i18n] Update translations ${{ env.NOW }}" - branch: i18n/${{ matrix.branch }}/update-translations-${{ env.NOW }} - base: ${{ matrix.branch }} +# --- +# name: "[i18n] Update translations" +# +# on: +# # allow running manually +# workflow_dispatch: +# # run weekly +# schedule: +# - cron: '30 5 1 * *' +# +# jobs: +# i18n: +# runs-on: ubuntu-latest +# +# strategy: +# matrix: +# branch: +# - 'master' +# - 'stable-4.9' +# - 'stable-4.10' +# +# steps: +# - uses: actions/checkout@v4 +# with: +# ref: ${{ matrix.branch }} +# +# - name: Set up Python +# uses: actions/setup-python@v4 +# +# - name: Update apt +# run: sudo apt -y update +# +# - name: Install LDAP requirements +# run: sudo apt-get install -y libsasl2-dev libldap2-dev libssl-dev build-essential gettext python-setuptools +# +# - name: Upgrade pip +# run: pip install pip --upgrade +# +# - name: Install galaxy_ng editable +# run: pip install -e . +# +# - name: Extract strings +# run: | +# cd galaxy_ng +# django-admin makemessages --all +# +# - name: Check if files were updated +# run: | +# filesChanged=$(git diff --ignore-matching-lines=POT-Creation-Date) +# if [ -z "$filesChanged" ] +# then +# echo "openPR=false" >> $GITHUB_ENV +# else +# echo "openPR=true" >> $GITHUB_ENV +# fi +# shell: bash +# +# - name: Clear fuzzy entries +# run: bash .github/workflows/scripts/clear_fuzzy_entries.sh +# +# - name: Compile strings +# run: | +# cd galaxy_ng +# django-admin compilemessages +# +# - name: Set current date as env variable +# run: echo "NOW=$(date +'%Y-%m-%d')" >> $GITHUB_ENV +# +# - name: Create a Pull Request (only if files were updated) +# if: env.openPR == 'true' +# uses: peter-evans/create-pull-request@v5 +# with: +# token: ${{ secrets.GITHUB_TOKEN }} +# committer: ansible +# author: ansible +# commit-message: | +# Automated updated of i18n strings on ${{ env.NOW }} +# No-Issue +# body: | +# No-Issue +# title: "[i18n] Update translations ${{ env.NOW }}" +# branch: i18n/${{ matrix.branch }}/update-translations-${{ env.NOW }} +# base: ${{ matrix.branch }} diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index fe90ab1091..990b418160 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -1,21 +1,21 @@ -# Add labels to pull requests against master -# uses logic in .github/labeler.yml - ---- -name: "Add labels to pull request" - -on: - pull_request_target: - branches: [ "master" ] - types: [ "opened" ] - -jobs: - triage: - permissions: - contents: read - pull-requests: write - runs-on: ubuntu-latest - steps: - - uses: actions/labeler@v4 - with: - repo-token: "${{ secrets.GITHUB_TOKEN }}" +# # Add labels to pull requests against master +# # uses logic in .github/labeler.yml +# +# --- +# name: "Add labels to pull request" +# +# on: +# pull_request_target: +# branches: [ "master" ] +# types: [ "opened" ] +# +# jobs: +# triage: +# permissions: +# contents: read +# pull-requests: write +# runs-on: ubuntu-latest +# steps: +# - uses: actions/labeler@v4 +# with: +# repo-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/publish_local_junit_results.yml b/.github/workflows/publish_local_junit_results.yml index 962791b91c..f2b20cfd9f 100644 --- a/.github/workflows/publish_local_junit_results.yml +++ b/.github/workflows/publish_local_junit_results.yml @@ -29,7 +29,7 @@ jobs: done - name: Publish Unit Test Results - uses: EnricoMi/publish-unit-test-result-action@v1 + uses: EnricoMi/publish-unit-test-result-action@v2 with: commit: ${{ github.event.workflow_run.head_sha }} event_file: artifacts/Event File/event.json From 5b49cedd9e70028cf5ad9215a8f591735fac861b Mon Sep 17 00:00:00 2001 From: Bruno Rocha Date: Thu, 3 Oct 2024 16:31:23 +0100 Subject: [PATCH 4/4] Will it work? --- .github/workflows/ci_full.yml | 21 +++++++++---------- .../workflows/publish_local_junit_results.yml | 2 +- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci_full.yml b/.github/workflows/ci_full.yml index 2de7aacab2..d7c2c31b54 100644 --- a/.github/workflows/ci_full.yml +++ b/.github/workflows/ci_full.yml @@ -48,17 +48,6 @@ jobs: - name: Check for gettext problems run: sh .ci/scripts/check_gettext.sh - - event_file: - name: "Event File" - runs-on: ubuntu-latest - steps: - - name: Upload - uses: actions/upload-artifact@v4 - with: - name: Event File - path: ${{ github.event_path }} - test: runs-on: ubuntu-latest steps: @@ -112,3 +101,13 @@ jobs: # FIXME: do we really care about these anymore ... ? #- name: run the functional test playbook # run: cd dev/playbooks; ANSIBLE_STDOUT_CALLBACK=yaml ansible-playbook -i 'localhost,' --forks=1 -v run_functional_tests.yaml + + event_file: + name: "Event File" + runs-on: ubuntu-latest + steps: + - name: Upload + uses: actions/upload-artifact@v4 + with: + name: Event File + path: ${{ github.event_path }} diff --git a/.github/workflows/publish_local_junit_results.yml b/.github/workflows/publish_local_junit_results.yml index f2b20cfd9f..c043f770ef 100644 --- a/.github/workflows/publish_local_junit_results.yml +++ b/.github/workflows/publish_local_junit_results.yml @@ -2,7 +2,7 @@ name: Local Unit Test Results on: workflow_run: - workflows: ["CI"] + workflows: ["galaxy_ng/ci"] types: - completed