26 lines
572 B
YAML
26 lines
572 B
YAML
name: Python CI
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
build-and-test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout mã nguồn
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Cài đặt Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.10'
|
|
|
|
- name: Cài đặt dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install -r requirements.txt
|
|
|
|
- name: Kiểm tra định dạng mã (Linting)
|
|
run: ruff check .
|
|
|
|
- name: Chạy Unit Tests
|
|
run: pytest -v |