mirror of
https://github.com/ansible-collections/hetzner.hcloud
synced 2024-11-10 06:34:13 +00:00
dfff49e31f
* chore: add pre-commit config * chore: fix pre-commit errors * chore: add black pre-commit hook * style: format python files with black * chore: add isort pre-commit hook * style: format python files using isort * chore: add pyupgrade pre-commit hook * refactor: upgrade code to python3.7 * Allow stacking PRs Co-authored-by: Julian Tölle <julian.toelle97@gmail.com> --------- Co-authored-by: Julian Tölle <julian.toelle97@gmail.com>
45 lines
928 B
YAML
45 lines
928 B
YAML
stages:
|
|
- lint
|
|
- sanity
|
|
- integration
|
|
|
|
variables:
|
|
PYTHON_VERSION: "3.9"
|
|
|
|
default:
|
|
image: python:$PYTHON_VERSION
|
|
|
|
pre-commit:
|
|
stage: lint
|
|
|
|
image: python:3.11-alpine
|
|
before_script:
|
|
- apk add build-base git
|
|
- pip install pre-commit
|
|
script:
|
|
- pre-commit run --all-files --show-diff-on-failure
|
|
|
|
sanity:
|
|
stage: sanity
|
|
allow_failure: true
|
|
except:
|
|
- tags
|
|
parallel:
|
|
matrix:
|
|
- ANSIBLE_VERSION: ["devel", "2.12", "2.13", "2.14", "2.15"]
|
|
GROUP: [1]
|
|
script:
|
|
- bash tests/utils/gitlab/gitlab.sh ${ANSIBLE_VERSION}/sanity/${GROUP}
|
|
|
|
integration:
|
|
stage: integration
|
|
except:
|
|
- tags
|
|
parallel:
|
|
matrix:
|
|
- ANSIBLE_VERSION: ["devel"]
|
|
GROUP: [1, 2, 3]
|
|
script:
|
|
- echo "$HCLOUD_TOKEN" >> "$(pwd)/hcloud_token.txt"
|
|
- echo "$CI_JOB_ID" >> "$(pwd)/prefix.txt"
|
|
- bash tests/utils/gitlab/gitlab.sh ${ANSIBLE_VERSION}/hcloud/${PYTHON_VERSION}/${GROUP}
|