[ci] Test and lint workflows (#14249)

Authored by: bashonly
pull/14257/head
bashonly 3 days ago committed by GitHub
parent cd94e70040
commit 7c9b10ebc8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -0,0 +1,28 @@
self-hosted-runner:
labels:
# Workaround for the outdated runner list in actionlint v1.7.7
# Ref: https://github.com/rhysd/actionlint/issues/533
- windows-11-arm
config-variables:
- KEEP_CACHE_WARM
- PUSH_VERSION_COMMIT
- UPDATE_TO_VERIFICATION
- PYPI_PROJECT
- PYPI_SUFFIX
- NIGHTLY_PYPI_PROJECT
- NIGHTLY_PYPI_SUFFIX
- NIGHTLY_ARCHIVE_REPO
- BUILD_NIGHTLY
- MASTER_PYPI_PROJECT
- MASTER_PYPI_SUFFIX
- MASTER_ARCHIVE_REPO
- BUILD_MASTER
- ISSUE_LOCKDOWN
- SANITIZE_COMMENT
paths:
.github/workflows/build.yml:
ignore:
# SC1090 "Can't follow non-constant source": ignore when using `source` to activate venv
- '.+SC1090.+'

@ -81,7 +81,7 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.10" # Keep this in sync with test-workflows.yml
- name: Process inputs
id: process_inputs

@ -0,0 +1,46 @@
name: Test and lint workflows
on:
push:
paths:
- .github/workflows/*
- devscripts/setup_variables.py
- devscripts/setup_variables_tests.py
- devscripts/utils.py
pull_request:
paths:
- .github/workflows/*
- devscripts/setup_variables.py
- devscripts/setup_variables_tests.py
- devscripts/utils.py
permissions:
contents: read
env:
ACTIONLINT_VERSION: "1.7.7"
ACTIONLINT_SHA256SUM: 023070a287cd8cccd71515fedc843f1985bf96c436b7effaecce67290e7e0757
ACTIONLINT_REPO: https://github.com/rhysd/actionlint
jobs:
check:
name: Check workflows
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10" # Keep this in sync with release.yml's prepare job
- name: Install requirements
env:
ACTIONLINT_TARBALL: ${{ format('actionlint_{0}_linux_amd64.tar.gz', env.ACTIONLINT_VERSION) }}
run: |
sudo apt -y install shellcheck
python -m pip install -U pyflakes
curl -LO "${ACTIONLINT_REPO}/releases/download/v${ACTIONLINT_VERSION}/${ACTIONLINT_TARBALL}"
printf '%s %s' "${ACTIONLINT_SHA256SUM}" "${ACTIONLINT_TARBALL}" | sha256sum -c -
tar xvzf "${ACTIONLINT_TARBALL}" actionlint
chmod +x actionlint
- name: Run actionlint
run: |
./actionlint -color
- name: Test GHA devscripts
run: |
python -m devscripts.setup_variables_tests
Loading…
Cancel
Save