Skip to content

Commit

Permalink
update CI
Browse files Browse the repository at this point in the history
  • Loading branch information
chraibi committed Sep 29, 2024
1 parent d8ab1e8 commit 30fe0a8
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 20 deletions.
38 changes: 21 additions & 17 deletions .github/workflows/streamlit-actions.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

name: madras-data-app

on:
Expand All @@ -13,25 +14,28 @@ jobs:
streamlit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- uses: streamlit/[email protected]
with:
app-path: app.py
ruff: true

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install black mypy ruff
pip install -r requirements.txt
python -m pip install --upgrade pip --quiet
pip install -r requirements.txt --quiet
pip install mypy ruff --quiet
- name: Lint with Ruff
run: ruff .
- name: Format with Black
run: |
black --diff $(git ls-files '*.py')
- name: Analysing with Mypy
run: |
mypy --strict $(git ls-files '*.py')
run: ruff check .

- name: Analyze with Mypy
run: mypy --strict --jobs 4 $(git ls-files '*.py')

- name: Run Streamlit app
uses: streamlit/[email protected]
with:
app-path: app.py
ruff: true
12 changes: 9 additions & 3 deletions .ruff.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
line-length = 180
target-version = "py311"
lint.select = ["E", "W", "F", "C", "R"]
lint.ignore = ["E501"]
# --extend-ignore = "E203, W503"

# Linting rule selection
select = ["E", "W", "F", "C", "R"]
ignore = ["E501"] # Ignore long line errors

# Exclude files from checks
exclude = [
"**/*.ipynb"
]

0 comments on commit 30fe0a8

Please sign in to comment.