Skip to content

Merge pull request #10 from OpenThaiGPT/ex1 #19

Merge pull request #10 from OpenThaiGPT/ex1

Merge pull request #10 from OpenThaiGPT/ex1 #19

Workflow file for this run

name: Linting and Formatting
on:
pull_request:
branches:
- "main"
push:
branches:
- "main"
concurrency:
group: linter:${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
lint_and_format:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.9"] # requires python<=3.9
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip" # caching pip dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run Black
run: |
black --check .
- name: Run Flake8
if: ${{ always() }}
run: |
flake8