summaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorAlan Rominger <arominge@redhat.com>2023-02-02 21:27:18 +0100
committerAlan Rominger <arominge@redhat.com>2023-02-03 20:24:43 +0100
commita949ee048a7b102dd926d22d101c6738b6d8506c (patch)
tree8f794e5bf19061110c1d1108cab4b3d2d768d149 /.github
parentMerge pull request #13475 from john-westcott-iv/add_m2m_unit_test (diff)
downloadawx-a949ee048a7b102dd926d22d101c6738b6d8506c.tar.xz
awx-a949ee048a7b102dd926d22d101c6738b6d8506c.zip
Consolidate CI logic with github_ci_runner target
Delete outright the step to install python Fix typo that failed to label stage
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/ci.yml56
1 files changed, 9 insertions, 47 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index faa2b02192..345d35563a 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -1,8 +1,11 @@
---
name: CI
env:
- BRANCH: ${{ github.base_ref || 'devel' }}
LC_ALL: "C.UTF-8" # prevent ERROR: Ansible could not initialize the preferred locale: unsupported locale setting
+ py_version: "3.9"
+ CI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ DEV_DOCKER_TAG_BASE: ghcr.io/${{ github.repository_owner }}
+ COMPOSE_TAG: ${{ github.base_ref || 'devel' }}
on:
pull_request:
jobs:
@@ -43,60 +46,23 @@ jobs:
steps:
- uses: actions/checkout@v2
- - name: Get python version from Makefile
- 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: Log in to registry
- run: |
- echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
-
- - name: Pre-pull image to warm build cache
- run: |
- docker pull ghcr.io/${{ github.repository_owner }}/awx_devel:${{ env.BRANCH }} || :
-
- - name: Build image
- run: |
- DEV_DOCKER_TAG_BASE=ghcr.io/${{ github.repository_owner }} COMPOSE_TAG=${{ env.BRANCH }} make docker-compose-build
+ - name: Run check ${{ matrix.tests.label }}
+ run: make github_ci_runner
+ env:
+ CI_GITHUB_COMMAND: ${{ matrix.tests.command }}
- - name: ${{ matrix.texts.label }}
- run: |
- docker run -u $(id -u) --rm -v ${{ github.workspace}}:/awx_devel/:Z \
- --workdir=/awx_devel ghcr.io/${{ github.repository_owner }}/awx_devel:${{ env.BRANCH }} ${{ matrix.tests.command }}
dev-env:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- - name: Get python version from Makefile
- 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: Log in to registry
- run: |
- echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
-
- - name: Pre-pull image to warm build cache
- run: |
- docker pull ghcr.io/${{ github.repository_owner }}/awx_devel:${{ env.BRANCH }} || :
-
- - name: Build image
- run: |
- DEV_DOCKER_TAG_BASE=ghcr.io/${{ github.repository_owner }} COMPOSE_TAG=${{ env.BRANCH }} make docker-compose-build
-
- name: Run smoke test
- run: |
- export DEV_DOCKER_TAG_BASE=ghcr.io/${{ github.repository_owner }}
- export COMPOSE_TAG=${{ env.BRANCH }}
- ansible-playbook tools/docker-compose/ansible/smoke-test.yml -e repo_dir=$(pwd) -v
+ run: make github_ci_setup && ansible-playbook tools/docker-compose/ansible/smoke-test.yml -v
awx-operator:
runs-on: ubuntu-latest
@@ -112,10 +78,6 @@ jobs:
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: