--- name: CI env: LC_ALL: "C.UTF-8" # prevent ERROR: Ansible could not initialize the preferred locale: unsupported locale setting CI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} DEV_DOCKER_OWNER: ${{ github.repository_owner }} COMPOSE_TAG: ${{ github.base_ref || 'devel' }} on: pull_request: jobs: common-tests: name: ${{ matrix.tests.name }} runs-on: ubuntu-latest permissions: packages: write contents: read strategy: fail-fast: false matrix: tests: - name: api-test command: /start_tests.sh - name: api-lint command: /var/lib/awx/venv/awx/bin/tox -e linters - name: api-swagger command: /start_tests.sh swagger - name: awx-collection command: /start_tests.sh test_collection_all - name: api-schema command: /start_tests.sh detect-schema-change SCHEMA_DIFF_BASE_BRANCH=${{ github.event.pull_request.base.ref }} - name: ui-lint command: make ui-lint - name: ui-test-screens command: make ui-test-screens - name: ui-test-general command: make ui-test-general steps: - uses: actions/checkout@v2 - name: Run check ${{ matrix.tests.name }} run: AWX_DOCKER_CMD='${{ matrix.tests.command }}' make github_ci_runner dev-env: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Run smoke test run: make github_ci_setup && ansible-playbook tools/docker-compose/ansible/smoke-test.yml -v awx-operator: runs-on: ubuntu-latest steps: - name: Checkout awx uses: actions/checkout@v2 with: path: awx - name: Checkout awx-operator uses: actions/checkout@v2 with: repository: ansible/awx-operator path: awx-operator - name: Get python version from Makefile working-directory: awx run: echo py_version=`make PYTHON_VERSION` >> $GITHUB_ENV - name: Install python ${{ env.py_version }} uses: actions/setup-python@v2 with: python-version: ${{ env.py_version }} - name: Install playbook dependencies run: | python3 -m pip install docker - name: Build AWX image working-directory: awx run: | ansible-playbook -v tools/ansible/build.yml \ -e headless=yes \ -e awx_image=awx \ -e awx_image_tag=ci \ -e ansible_python_interpreter=$(which python3) - name: Run test deployment with awx-operator working-directory: awx-operator run: | python3 -m pip install -r molecule/requirements.txt ansible-galaxy collection install -r molecule/requirements.yml sudo rm -f $(which kustomize) make kustomize KUSTOMIZE_PATH=$(readlink -f bin/kustomize) molecule -v test -s kind env: AWX_TEST_IMAGE: awx AWX_TEST_VERSION: ci collection-sanity: name: awx_collection sanity runs-on: ubuntu-latest strategy: fail-fast: false steps: - uses: actions/checkout@v2 # The containers that GitHub Actions use have Ansible installed, so upgrade to make sure we have the latest version. - name: Upgrade ansible-core run: python3 -m pip install --upgrade ansible-core - name: Run sanity tests run: make test_collection_sanity env: # needed due to cgroupsv2. This is fixed, but a stable release # with the fix has not been made yet. ANSIBLE_TEST_PREFER_PODMAN: 1