From 83e4db71d4600d58366446c63ff453de51facb33 Mon Sep 17 00:00:00 2001 From: Alessandro Rodi Date: Tue, 5 Nov 2024 09:24:58 +0100 Subject: [PATCH 1/4] Setup github actions --- .github/workflows/test.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..ade7646 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,33 @@ +name: Test & lint +on: [push] + +jobs: + tests: + name: Test + + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + ruby: [3.3] + + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + bundler-cache: true + + - name: Install dependencies + run: bundle install --jobs 4 --retry 3 + + - name: Run tests + run: bundle exec rails test + + - name: Run linters + run: bin/fastcheck From 93eecdab01079700aaf099fa3b24a0b8c2740b47 Mon Sep 17 00:00:00 2001 From: Alessandro Rodi Date: Tue, 5 Nov 2024 09:25:32 +0100 Subject: [PATCH 2/4] Add platform --- Gemfile.lock | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index a80efd1..0f81465 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -46,6 +46,7 @@ GEM rubocop-ast (>= 0.4.0) ruby-progressbar (1.11.0) sqlite3 (1.5.0-arm64-darwin) + sqlite3 (1.5.0-x86_64-linux) standard (0.13.0) rubocop (= 1.10.0) rubocop-performance (= 1.9.2) @@ -56,6 +57,7 @@ GEM PLATFORMS arm64-darwin-21 + x86_64-linux DEPENDENCIES minitest (~> 5.0) @@ -65,4 +67,4 @@ DEPENDENCIES validation_errors! BUNDLED WITH - 2.3.21 + 2.5.18 From c5b42606721ee35f21a56a39ad2a72b0b588a1bc Mon Sep 17 00:00:00 2001 From: Alessandro Rodi Date: Tue, 5 Nov 2024 09:28:22 +0100 Subject: [PATCH 3/4] Lower ruby version --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ade7646..305483b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,7 +9,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - ruby: [3.3] + ruby: [3.1] runs-on: ${{ matrix.os }} From 362c917f83417257cef7f8db5d34b169485a130e Mon Sep 17 00:00:00 2001 From: Alessandro Rodi Date: Tue, 5 Nov 2024 09:29:15 +0100 Subject: [PATCH 4/4] Fix commands --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 305483b..1ae7d59 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -27,7 +27,7 @@ jobs: run: bundle install --jobs 4 --retry 3 - name: Run tests - run: bundle exec rails test + run: bundle exec rake test - name: Run linters - run: bin/fastcheck + run: bundle exec standardrb