Skip to content

Commit

Permalink
☁️ Update CI/CD
Browse files Browse the repository at this point in the history
☁️ Update CI/CD
  • Loading branch information
alekseymalakhov11 authored Aug 28, 2024
2 parents 1d999de + d476be3 commit e22595f
Show file tree
Hide file tree
Showing 7 changed files with 7,500 additions and 14 deletions.
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

0 comments on commit e22595f

Please sign in to comment.