💚 fix publish workflow #13
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: Lint | |
on: | |
workflow_call: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
concurrency: | |
group: lint-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
lint-poetry: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Install Python Poetry | |
uses: abatilo/[email protected] | |
with: | |
poetry-version: 1.5.1 | |
- name: Check poetry config is valid | |
run: | | |
poetry check | |
lint-python: | |
needs: lint-poetry | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Install Python Poetry | |
uses: abatilo/[email protected] | |
with: | |
poetry-version: 1.5.1 | |
- name: Install project dependencies | |
run: | | |
poetry install | |
- name: Lint python code (flake8) | |
run: | | |
poetry run flake8 --count --show-source --statistics | |
lint-dockerfile: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Lint dockerfile | |
uses: hadolint/[email protected] | |
lint-markdown: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Lint markdown | |
uses: avto-dev/[email protected] | |
with: | |
args: "**/*.md" | |
lint-yaml: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Lint yaml files | |
uses: ibiqlik/[email protected] |