Validate Python solution #16
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: Validate Python solution | |
on: | |
schedule: | |
- cron: '0 0 * * 2' | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
validate-python: | |
name: Validate Python solution | |
runs-on: ubuntu-latest | |
container: python:3.11 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Check Python version | |
run: python --version | |
- name: Install packages | |
run: pip install black flake8 | |
working-directory: ./src | |
- name: Lint with flake8 | |
run: flake8 --count --verbose *.py | |
working-directory: ./src | |
- name: Check format with black | |
run: black --check --verbose --line-length 79 *.py | |
working-directory: ./src |