ci #236
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: ci | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
workflow_dispatch: | |
schedule: | |
- cron: '45 4 * * 4' # weekly on thursday morning | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: | |
- '3.7' | |
- '3.8' | |
- '3.9' | |
- '3.10' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
pip install poetry | |
poetry install | |
- name: Lint | |
run: | | |
poetry run yapf -q -r promgen_k8s | |
poetry run pylint --ignore=snapshots promgen_k8s tests | |
poetry run mypy promgen_k8s | |
- name: Test | |
run: | | |
poetry run pytest | |
actionlint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Check workflow files | |
run: | | |
echo "::add-matcher::.github/actionlint-matcher.json" | |
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) | |
./actionlint |