Skip to content

Disable dumb rule #1286

Disable dumb rule

Disable dumb rule #1286

Workflow file for this run

name: Unit test
on:
- push
permissions:
contents: read
jobs:
pytest_amd64:
runs-on: ubuntu-24.04
name: pytest amd64
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r tests/requirements.txt
gpg --recv-keys C874011F0AB405110D02105534365D9472D7468F \
&& echo "C874011F0AB405110D02105534365D9472D7468F:6:" | gpg --import-ownertrust
- name: Run tests
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
TERRAFORM_ACTIONS_GITHUB_TOKEN: "No"
run: |
GNUPGHOME=$HOME/.gnupg PYTHONPATH=image/tools:image/src pytest tests
pytest_arm64:
runs-on: ubuntu-24.04-arm
name: pytest arm64
needs: pytest_amd64
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r tests/requirements.txt
gpg --recv-keys C874011F0AB405110D02105534365D9472D7468F \
&& echo "C874011F0AB405110D02105534365D9472D7468F:6:" | gpg --import-ownertrust
- name: Run tests
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
TERRAFORM_ACTIONS_GITHUB_TOKEN: "No"
run: |
GNUPGHOME=$HOME/.gnupg PYTHONPATH=image/tools:image/src pytest tests
docs:
runs-on: ubuntu-24.04
name: Check documentation
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Check documentation is up-to-date
run: |
PYTHONPATH=docs-gen python3 docs-gen/generate.py
git diff --exit-code
lint:
runs-on: ubuntu-24.04
name: Linting
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Actions workflows (including action metadata)
run: |
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
./actionlint
./actionlint example_workflows/*.yaml
- name: Install the latest version of uv
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
- name: Actions Security Check
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
uvx zizmor --format plain .
- name: Lint CHANGELOG
uses: DavidAnson/markdownlint-cli2-action@07035fd053f7be764496c0f8d8f9f41f98305101 # v22.0.0
with:
config: '.config/changelog.markdownlint.yaml'
globs: 'CHANGELOG.md'
- name: Lint Other Markdown
uses: DavidAnson/markdownlint-cli2-action@07035fd053f7be764496c0f8d8f9f41f98305101 # v22.0.0
with:
config: '.config/.markdownlint.yaml'
globs: |
docs/*.md
**/README.md
- name: Lint Dockerfile
uses: hadolint/hadolint-action@2332a7b74a6de0dda2e2221d575162eba76ba5e5 # v3.3.0
with:
dockerfile: ./image/Dockerfile
- name: Lint Dockerfile-base
uses: hadolint/hadolint-action@2332a7b74a6de0dda2e2221d575162eba76ba5e5 # v3.3.0
with:
dockerfile: ./image/Dockerfile-base
- name: Run ShellCheck
run: |
cd image/entrypoints
shellcheck ../actions.sh ../workflow_commands.sh ./*.sh --enable add-default-case,avoid-nullary-conditional,require-double-brackets,deprecate-which
- name: Lint YAML files
run: |
pip install yamllint
yamllint -c .config/.yamllint.yaml .
V8R_CONFIG_FILE=.config/.v8rrc.yaml npx v8r --ignore-errors
- uses: astral-sh/ruff-action@4919ec5cf1f49eff0871dbcea0da843445b837e6 # v3.6.1
with:
args: --config=.config/ruff.toml check