Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set up basic CI flow (python 3.8 -> 3.12) #69

Merged
merged 5 commits into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions .github/workflows/lint_build_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Mistral Common CI
on:
push:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review

# we cancel all runs of previous commits in PR. On main we run the CI on all commits
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || 'no-pr' }}
cancel-in-progress: ${{ github.event.pull_request.number != null }}

jobs:
build_lint_test:
if: ${{ github.event.pull_request.draft != true }}
runs-on: ubuntu-latest
strategy:
matrix:
# For our public version of that code, support it back to Python 3.8.
python-version: [
"3.8",
"3.9",
"3.10",
"3.11",
"3.12"
]
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

# Install
- name: Install Dependencies
run: |
pip install "poetry==1.*"
poetry install --extras "opencv"

# Ruff Linter
- name: Ruff Linter
run: |
poetry run ruff check .

# Ruff Format
- name: Ruff Format
run: |
poetry run ruff format . --check

# Mypy
- name: Mypy Check
run: |
poetry run mypy .

# PyTest
- name: Tests
run: |
poetry run pytest --cov=mistral_common . --cov-report "xml:coverage.xml"
Loading
Loading