Skip to content

Commit

Permalink
Add CI workflow for linting and testing
Browse files Browse the repository at this point in the history
  • Loading branch information
landajuela committed Jan 11, 2025
1 parent 7cf0a90 commit 146f181
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: CI for Linting and Testing

# Run the workflow on push and pull requests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest

steps:
# Step 1: Checkout the repository
- name: Checkout repository
uses: actions/checkout@v3

# Step 2: Set up Python
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'

# Step 3: Install dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[dev]
# Step 4: Run flake8 for linting
- name: Lint with flake8
run: |
flake8 --ignore=E501,E203,W503 protlib_designer scripts
# Step 5: Check formatting with black
- name: Check formatting with black
run: |
black --check -S -t py39 protlib_designer scripts
# Step 6: Run tests with pytest
- name: Run tests with pytest
run: |
pytest

0 comments on commit 146f181

Please sign in to comment.