generated from linux-system-roles/template
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Sergei Petrosian <[email protected]>
- Loading branch information
Showing
8 changed files
with
167 additions
and
8 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
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 |
---|---|---|
|
@@ -83,7 +83,6 @@ jobs: | |
name: Version ${{ steps.tag.outputs.tagname }} | ||
bodyFile: ./.tagmsg.txt | ||
makeLatest: true | ||
|
||
- name: Publish role to Galaxy | ||
uses: robertdebock/[email protected] | ||
with: | ||
|
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,48 @@ | ||
--- | ||
name: CodeQL | ||
on: # yamllint disable-line rule:truthy | ||
push: | ||
branches: ["main"] | ||
pull_request: | ||
branches: ["main"] | ||
merge_group: | ||
branches: | ||
- main | ||
types: | ||
- checks_requested | ||
schedule: | ||
- cron: 48 9 * * 6 | ||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: [python] | ||
steps: | ||
- name: Update pip, git | ||
run: | | ||
set -euxo pipefail | ||
sudo apt update | ||
sudo apt install -y git | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v2 | ||
with: | ||
languages: ${{ matrix.language }} | ||
queries: +security-and-quality | ||
|
||
- name: Autobuild | ||
uses: github/codeql-action/autobuild@v2 | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v2 | ||
with: | ||
category: "/language:${{ matrix.language }}" |
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
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,84 @@ | ||
--- | ||
# yamllint disable rule:line-length | ||
name: Python Unit Tests | ||
on: # yamllint disable-line rule:truthy | ||
pull_request: | ||
merge_group: | ||
branches: | ||
- main | ||
types: | ||
- checks_requested | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
permissions: | ||
contents: read | ||
jobs: | ||
python: | ||
strategy: | ||
matrix: | ||
pyver_os: | ||
- ver: "2.7" | ||
os: ubuntu-20.04 | ||
- ver: "3.6" | ||
os: ubuntu-20.04 | ||
- ver: "3.8" | ||
os: ubuntu-latest | ||
- ver: "3.9" | ||
os: ubuntu-latest | ||
- ver: "3.10" | ||
os: ubuntu-latest | ||
- ver: "3.11" | ||
os: ubuntu-latest | ||
runs-on: ${{ matrix.pyver_os.os }} | ||
steps: | ||
- name: Update git | ||
run: | | ||
set -euxo pipefail | ||
sudo apt update | ||
sudo apt install -y git | ||
- name: checkout PRuses: actions/checkout@v4 | ||
|
||
- name: Set up Python 2.7 | ||
if: ${{ matrix.pyver_os.ver == '2.7' }} | ||
run: | | ||
set -euxo pipefail | ||
sudo apt install -y python2.7 | ||
- name: Set up Python 3 | ||
if: ${{ matrix.pyver_os.ver != '2.7' }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.pyver_os.ver }} | ||
|
||
- name: Install platform dependencies, python, tox, tox-lsr | ||
run: | | ||
set -euxo pipefail | ||
python -m pip install --upgrade pippip install "git+https://github.com/linux-system-roles/[email protected]" | ||
# If you have additional OS dependency packages e.g. libcairo2-dev | ||
# then put them in .github/config/ubuntu-requirements.txt, one | ||
# package per line. | ||
if [ -f .github/config/ubuntu-requirements.txt ]; then | ||
sudo apt-get install -y $(cat .github/config/ubuntu-requirements.txt) | ||
fi | ||
- name: Run unit tests | ||
run: | | ||
set -euxo pipefail | ||
toxpyver=$(echo "${{ matrix.pyver_os.ver }}" | tr -d .) | ||
toxenvs="py${toxpyver}" | ||
# NOTE: The use of flake8, pylint, black with specific | ||
# python envs is arbitrary and must be changed in tox-lsr | ||
# We really should either do those checks using the latest | ||
# version of python, or in every version of python | ||
case "$toxpyver" in | ||
27) toxenvs="${toxenvs},coveralls,flake8,pylint" ;; | ||
36) toxenvs="${toxenvs},coveralls,black" ;; | ||
*) toxenvs="${toxenvs},coveralls" ;; | ||
esac | ||
TOXENV="$toxenvs" lsr_ci_runtox | ||
- name: Upload coverage reports to Codecov | ||
uses: codecov/codecov-action@v3 |
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
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
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