From 55900c3df90f7f5361c2e86b50835e7129ef888b Mon Sep 17 00:00:00 2001 From: Andrea Date: Tue, 9 Sep 2025 13:33:27 +0200 Subject: [PATCH] chore: add github actions --- .github/workflows/code-quality.yaml | 36 +++++++++++++++++++++++++++++ .github/workflows/run-tests.yaml | 19 +++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 .github/workflows/code-quality.yaml create mode 100644 .github/workflows/run-tests.yaml diff --git a/.github/workflows/code-quality.yaml b/.github/workflows/code-quality.yaml new file mode 100644 index 0000000..9ee421c --- /dev/null +++ b/.github/workflows/code-quality.yaml @@ -0,0 +1,36 @@ +name: Code Quality + +on: + push: + +jobs: + format: + runs-on: ubuntu-latest + steps: + - name: Check out repository code + uses: actions/checkout@v5 + + - name: Setup Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: .ruby-version + bundler-cache: true + + - name: Check formatting + run: bundle exec rubocop --only Layout --parallel + + lint: + runs-on: ubuntu-latest + needs: format + steps: + - name: Check out repository code + uses: actions/checkout@v5 + + - name: Setup Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: .ruby-version + bundler-cache: true + + - name: Run lint + run: bundle exec rubocop --except Layout --parallel diff --git a/.github/workflows/run-tests.yaml b/.github/workflows/run-tests.yaml new file mode 100644 index 0000000..8fd62c2 --- /dev/null +++ b/.github/workflows/run-tests.yaml @@ -0,0 +1,19 @@ +name: Run tests +on: + push: + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Check out repository code + uses: actions/checkout@v5 + + - name: Setup ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: .ruby-version + bundler-cache: true + + - name: Run tests + run: bundle exec rake test \ No newline at end of file