From d7ecb6b3a6b47538ef57dae7223e48457ce8e8dc Mon Sep 17 00:00:00 2001 From: Karanjot Singh <99573351+Karanjot786@users.noreply.github.com> Date: Tue, 8 Oct 2024 20:44:34 +0530 Subject: [PATCH] ci: reformat, reset branches & upgrade actions (#30) --- .github/workflows/ci.yml | 63 +++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 33 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fa999e2..9796dab 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,43 +2,40 @@ name: CI on: push: - branches: [ main ] + branches: '*' pull_request: - branches: [ main ] + branches: '*' jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: '3.11' - - - name: Install Poetry - run: | - curl -sSL https://install.python-poetry.org | python3 - - poetry install - - - name: Lint with Ruff - run: | - poetry run ruff check crategen/ - - - name: Type check with Mypy - run: | - poetry run mypy crategen/ - - - name: Run security checks with Bandit - run: | - poetry run bandit -r crategen/ - - - name: Install test dependencies - run: | - poetry add pytest pytest-cov pytest-mock - - # - name: Run tests - # run: | - # poetry run pytest --cov=crategen + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.11' + + - name: Install Poetry + run: | + curl -sSL https://install.python-poetry.org | python3 - + poetry install + + - name: Lint with Ruff + run: | + poetry run ruff check crategen/ + if: ${{ success() }} + + - name: Type check with Mypy + run: | + poetry run mypy crategen/ + + - name: Run security checks with Bandit + run: | + poetry run bandit -r crategen/ + + - name: Install test dependencies + run: | + poetry add pytest pytest-cov pytest-mock \ No newline at end of file