diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..c952c3e7 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,37 @@ +name: CI + +on: [ 'push', 'pull_request' ] + +jobs: + lint: + runs-on: ubuntu-latest + name: lint + strategy: + matrix: + python-version: [ '3.10', '3.11' ] + fail-fast: false + steps: + - uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Install Dependencies + run: pip install ruff==0.0.262 pre-commit==3.2.2 + + - name: ruff check + uses: chartboost/ruff-action@v1 + with: + args: [ '--config', '.ruff.toml' ] + + - name: black formatter + uses: psf/black@stable + with: + options: '--skip-string-normalization --line-length 120' + + - name: pre-commit + uses: pre-commit/action@v3.0.0 + with: + extra_args: --all-files --verbose diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b1ec64c4..33df1e46 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -23,5 +23,3 @@ repos: - '--skip-string-normalization' - '--line-length' - '120' - - '--target-version' - - 'py310'