From 4da398ae1001532b0734d3a5f778cb331150b345 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Feldis <5403+jbfeldis@users.noreply.github.com> Date: Thu, 23 May 2024 17:55:22 +0200 Subject: [PATCH] Ajoute rubocop et brakeman --- .github/workflows/lint.yml | 19 +++++++++++++++++++ .github/workflows/security.yml | 20 ++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 .github/workflows/lint.yml create mode 100644 .github/workflows/security.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 00000000..8843fbbd --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,19 @@ +name: RuboCop + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + bundler-cache: true + cache-version: 321 + + - name: Run RuboCop + run: bundle exec rubocop --parallel diff --git a/.github/workflows/security.yml b/.github/workflows/security.yml new file mode 100644 index 00000000..86370e9a --- /dev/null +++ b/.github/workflows/security.yml @@ -0,0 +1,20 @@ +name: Security + +on: [push] + +jobs: + security: + name: Brakeman (Static security) + if: "${{ github.actor != 'dependabot[bot]' }}" + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + + - name: Brakeman + uses: reviewdog/action-brakeman@v2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}