From cce7b5b62ae7a6b421608eb14cd99a38b5899294 Mon Sep 17 00:00:00 2001 From: Mattia Roccoberton Date: Sun, 8 Sep 2024 10:07:43 +0200 Subject: [PATCH] ci: add SQLite workflow --- .github/workflows/specs_sqlite_72.yml | 56 +++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .github/workflows/specs_sqlite_72.yml diff --git a/.github/workflows/specs_sqlite_72.yml b/.github/workflows/specs_sqlite_72.yml new file mode 100644 index 0000000..86efca0 --- /dev/null +++ b/.github/workflows/specs_sqlite_72.yml @@ -0,0 +1,56 @@ +--- +name: Specs Rails 7.2 SQLite + +on: + pull_request: + branches: [main] + push: + branches: [main] + +jobs: + tests: + runs-on: ubuntu-latest + + strategy: + matrix: + ruby: ['3.3'] + gemfile: ['rails_7_2_sqlite'] + + env: + BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile + DB_TEST: sqlite + RAILS: '7.0' + + steps: + - name: Install lib VIPS + run: sudo apt-get install -y libvips-dev + + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + bundler-cache: true + + - name: Database setup + run: bundle exec rails db:create db:migrate + + - name: Run tests + run: bundle exec rspec --profile + + - name: Code Climate test coverage + uses: paambaati/codeclimate-action@v3.0.0 + env: + CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} + with: + coverageLocations: | + ${{github.workspace}}/coverage/lcov/active_storage_db.lcov:lcov + + # - name: Upload coverage results + # uses: actions/upload-artifact@main + # if: always() + # with: + # name: coverage-report + # path: coverage/index.html