new idea with doing exec on root user after container start, conside … #42
Workflow file for this run
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
--- | |
name: "Style" | |
on: # yamllint disable-line rule:truthy | |
push: | |
branches: "**" | |
jobs: | |
setup: | |
runs-on: "self-hosted" | |
steps: | |
- uses: "actions/checkout@v4" | |
- uses: "actions/setup-python@v3" | |
with: | |
python-version: "3.10.12" | |
- name: "Install Python dependencies" | |
run: | | |
pip install --no-cache-dir --user \ | |
pylint==3.2.4 mypy==1.10.1 flake8==7.1.0 yamllint==1.35.1 | |
run-markdown-lint: | |
runs-on: "self-hosted" | |
needs: "setup" | |
steps: | |
- name: "Lint Markdown files" | |
uses: "articulate/actions-markdownlint@v1" | |
with: | |
version: "0.41.0" | |
run-yaml-lint: | |
runs-on: "self-hosted" | |
needs: "setup" | |
steps: | |
- name: "Lint YAML files" | |
run: "yamllint ." | |
run-shell-check: | |
runs-on: "self-hosted" | |
needs: "setup" | |
steps: | |
- name: "Lint shell scripts" | |
uses: "ludeeus/action-shellcheck@master" | |
with: | |
version: "v0.10.0" | |
run-docker-hadolint: | |
runs-on: "self-hosted" | |
needs: "setup" | |
steps: | |
- name: "Lint Dockerfiles" | |
uses: "hadolint/[email protected]" | |
with: | |
dockerfile: "Dockerfile" | |
recursive: true | |
run-terraform-tflint: | |
runs-on: "self-hosted" | |
needs: "setup" | |
steps: | |
- uses: "terraform-linters/setup-tflint@v4" | |
with: | |
tflint_version: "v0.51.1" | |
- name: "Lint Terraform testing infrastructure" | |
run: "tflint --init && tflint" | |
working-directory: "./tests/setup" | |
run-ansible-lint: | |
runs-on: "self-hosted" | |
needs: "setup" | |
steps: | |
- name: "Lint ansible testing playbook" | |
uses: "ansible/[email protected]" | |
run-python-pylint: | |
runs-on: "self-hosted" | |
needs: "setup" | |
steps: | |
- name: "Lint Python files with pylint" | |
run: "pylint $(find . -name '*.py')" | |
run-python-mypy: | |
runs-on: "self-hosted" | |
needs: "setup" | |
steps: | |
- name: "Lint Python files with mypy" | |
run: "mypy $(find . -name '*.py')" | |
run-python-flake8: | |
runs-on: "self-hosted" | |
needs: "setup" | |
steps: | |
- name: "Lint Python files with flake8" | |
run: "flake8" | |
run-system-tests-coverage: | |
runs-on: "self-hosted" | |
needs: "setup" | |
steps: | |
- name: "Calculate system tests coverage" | |
run: | | |
echo "COVERAGE=$(( | |
100 | |
- | |
$(grep --extended-regexp '^[^#]*[[:alnum:]]' ${{ env.TESTSUITE_RUN_FILE }} | wc --lines) | |
* | |
100 | |
/ | |
( | |
$(grep --extended-regexp '^[^#]*[[:alnum:]]' ${{ env.MAIN_RUN_FILE }} ${{ env.COMMON_RUN_FILE }} | wc --lines) | |
+ | |
$(comm -12 <(grep --extended-regexp '^[^#]*[[:alnum:]]' ${{ env.MAIN_RUN_FILE }} | sort) <(grep --extended-regexp '^[^#]*[[:alnum:]]' ${{ env.TESTSUITE_RUN_FILE }} | sort) | wc --lines) | |
) | |
))%" >> $GITHUB_ENV | |
env: | |
MAIN_RUN_FILE: "run.sh" | |
COMMON_RUN_FILE: "./src/common.sh" | |
TESTSUITE_RUN_FILE: "./tests/testsuite/roles/testing/files/system.sh" | |
- name: "Generate badge" | |
uses: "schneegans/[email protected]" | |
with: | |
auth: "${{ secrets.GIST_SECRET }}" | |
gistID: "d4fd269e226b0ed70954f861129a2756" | |
filename: "superset-cluster-codecoverage.json" | |
label: "System Tests Coverage" | |
message: "${{ env.COVERAGE }}" | |
valColorRange: "${{ env.COVERAGE }}" | |
maxColorRange: 100 | |
minColorRange: 0 |