forked from ansible/django-ansible-base
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
718946c
commit 8fa2b42
Showing
2 changed files
with
54 additions
and
29 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Setup images for AWX | ||
description: Builds new awx_devel image | ||
inputs: | ||
github-token: | ||
description: GitHub Token for registry access | ||
required: true | ||
sonar-token: | ||
description: the SonarCloud token | ||
required: true | ||
python-version: | ||
description: Python version | ||
required: true | ||
tox-env: | ||
description: the tox environment to run | ||
required: true | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Install build requirements | ||
run: sudo apt-get update && sudo apt-get install -y libsasl2-dev libldap2-dev libssl-dev libxmlsec1-dev | ||
|
||
- name: Install python ${{ python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ python-version }} | ||
|
||
- name: Install tox | ||
run: pip${{ python-version }} install tox | ||
|
||
- name: Run tox | ||
run: tox -e ${{ tox-env }} | ||
|
||
- name: Inject PR number into coverage.xml | ||
if: matrix.tests.sonar | ||
run: sed -i '2i <!-- PR ${{ github.event.number }} -->' coverage.xml | ||
|
||
- name: Upload coverage as artifact | ||
uses: actions/upload-artifact@v2 | ||
if: matrix.tests.sonar | ||
with: | ||
name: coverage | ||
path: coverage.xml | ||
|
||
- name: SonarCloud Scan (on push) | ||
uses: SonarSource/sonarcloud-github-action@master | ||
if: matrix.tests.sonar && github.event_name == 'push' && github.repository == 'ansible/django-ansible-base' | ||
env: | ||
GITHUB_TOKEN: ${{ github-token }} | ||
SONAR_TOKEN: ${{ sonar-token }} |
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