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

☁️ Update CI/CD #4

Merged
merged 21 commits into from
Aug 28, 2024
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
46 changes: 46 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Push
on: [push]

jobs:
tests:
strategy:
fail-fast: false
matrix:
python-version: ['3.10']
poetry-version: ['1.2.2']
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Run image
uses: abatilo/[email protected]
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Install dependencies
run: poetry install --extras "deepspeed gpu"
- name: Run tests
run: poetry run make tests
linters:
strategy:
fail-fast: false
matrix:
python-version: ['3.10']
poetry-version: ['1.2.2']
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Run image
uses: abatilo/[email protected]
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Install dependencies
run: poetry install --extras "deepspeed gpu"
- name: Run linters
run: poetry run make lint
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ coverage.xml
*.cover
.hypothesis/
.pytest_cache/
!tests/fixtures/models/llama2_tiny_multimodal_clip_mlp/projections/modality_adapters.pt

# Translations
*.mo
Expand Down Expand Up @@ -99,7 +100,6 @@ ENV/
env.bak/
venv.bak/
default_tb/
poetry.lock

# Spyder project settings
.spyderproject
Expand Down
9 changes: 9 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
repos:
- repo: local
hooks:
- id: poetry-make-pretty
name: make pretty
entry: poetry run make pretty
language: system
types: [python]
stages: [commit]
5 changes: 1 addition & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ flake:
flake8 --max-line-length 119 --jobs $(JOBS) --statistics $${CI:+--format=gl-codeclimate --output=codeclimate-flake8.json} $(CODE)

pylint:
pylint --jobs $(JOBS) --rcfile=setup.cfg $${CI:+--output-format=pylint_gitlab.GitlabCodeClimateReporter --output=codeclimate-pylint.json} $(CODE)
pylint --jobs $(JOBS) --rcfile=setup.cfg $(CODE)

mypy:
mypy --config-file mypy.ini $(CODE) --show-traceback
Expand All @@ -39,9 +39,6 @@ ifneq ($(CODE),)
unify --in-place --recursive $(CODE) tutorials
endif

bash-dev:
docker run -v $(shell pwd):/app --rm -it ${DEV_IMAGE} bash

lock:
rm poetry.lock
poetry lock
Expand Down
Loading
Loading