From 6fc1c2168eebd0771cde0cbc2ed37933402b933b Mon Sep 17 00:00:00 2001 From: Daniel Abraham Date: Wed, 3 Jul 2024 21:51:10 -0700 Subject: [PATCH] ENG-1075: Ruff CI --- .github/workflows/ci.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..d1caf758 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,32 @@ +# Continuous Integration workflow. For more information see: +# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python +# https://docs.astral.sh/ruff/integrations/#github-actions + +name: CI + +on: + push: + branches: [main] + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.11" + cache: pip + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install pytest ruff + - name: Lint & format with ruff + run: | + ruff check --target-version py311 --output-format github . + ruff format --target-version py311 --check . + - name: Test with pytest + run: | + pytest