diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..1ae7d59 --- /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.1] + + 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 rake test + + - name: Run linters + run: bundle exec standardrb 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