diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml new file mode 100644 index 0000000..fc90beb --- /dev/null +++ b/.github/workflows/check.yml @@ -0,0 +1,35 @@ +name: Lint and Test + +on: + push: + branches: + - "main" + pull_request: + +env: + PYTHON_VERSION: "3.12" + +jobs: + check: + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: ${{ env.PYTHON_VERSION }} + cache: "pip" + cache-dependency-path: "requirements-dev.txt" + - name: Install Dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements-dev.txt + + - name: Run Linter + run: | + black src --check --verbose + + - name: Run Tests + run: | + pytest diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index ddc5086..0000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Test - -on: - push: - branches: - - "**" - -jobs: - pytest: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: "3.12" - - name: install dependencies - run: pip install -r requirements-dev.txt - - name: run tests - run: pytest