Skip to content

OPSEXP-3456 Relax community.general requirement (#45) #173

OPSEXP-3456 Relax community.general requirement (#45)

OPSEXP-3456 Relax community.general requirement (#45) #173

Workflow file for this run

name: Build
on:
pull_request:
branches:
- main
push:
branches:
- main
tags:
- 'v*'
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true
env:
PY_COLORS: 1
PYTHONUNBUFFERED: 1
jobs:
build:
runs-on: ubuntu-latest
name: Galaxy build
needs:
- pre-commit
- sanity
- molecule
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install uv
uses: astral-sh/setup-uv@6b9c6063abd6010835644d4c2e1bef4cf5cd0fca # v6.0.1
- name: Setup Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version-file: ".python-version"
- name: galaxy build
run: |
uv run ansible-galaxy collection build
- name: galaxy publish
if: startsWith(github.ref, 'refs/tags/v')
run: >-
uv run ansible-galaxy collection publish
alfresco-platform-${GITHUB_REF#refs/tags/v}.tar.gz
--token "${{ secrets.ANSIBLE_GALAXY_API_KEY }}"
pre-commit:
runs-on: ubuntu-latest
name: Pre-commit
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install uv
uses: astral-sh/setup-uv@6b9c6063abd6010835644d4c2e1bef4cf5cd0fca # v6.0.1
- name: Setup Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version-file: ".python-version"
- uses: Alfresco/alfresco-build-tools/.github/actions/pre-commit@v8.19.1
with:
skip_checkout: true
sanity:
runs-on: ubuntu-latest
name: Sanity against Ⓐ ${{ matrix.ansible }}
strategy:
matrix:
ansible:
- stable-2.16
- stable-2.17
- stable-2.18
steps:
- name: Perform sanity testing
# See the documentation for the following GitHub action on
# https://github.com/ansible-community/ansible-test-gh-action/blob/main/README.md
uses: ansible-community/ansible-test-gh-action@b416b6ecf7ddb0ea3b0a51c1d198d715eba52c9d # v1.16.0
with:
ansible-core-version: ${{ matrix.ansible }}
testing-type: sanity
coverage: never # codecov integration required
molecule:
runs-on: ubuntu-latest
name: Molecule against ${{ matrix.roles.role_name }} role
strategy:
matrix:
roles:
- role_name: java
- role_name: systemd_service
- role_name: hxi_connector
- role_name: audit_storage
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install uv
uses: astral-sh/setup-uv@6b9c6063abd6010835644d4c2e1bef4cf5cd0fca # v6.0.1
- name: Setup Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version-file: ".python-version"
- name: Run molecule
env:
ANSIBLE_DIFF_ALWAYS: "true"
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }}
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
working-directory: roles/${{ matrix.roles.role_name }}
run: |
uv run molecule test