Update ruby-updates (major) #4430
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| paths-ignore: | |
| - '.github/**' | |
| - '!.github/workflows/ci.yml' | |
| - '**.md' | |
| branches: | |
| - main | |
| pull_request: | |
| paths-ignore: | |
| - '.github/**' | |
| - '!.github/workflows/ci.yml' | |
| - '**.md' | |
| branches: | |
| - main | |
| types: [opened, synchronize] | |
| jobs: | |
| run-test: | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| pull-requests: write | |
| timeout-minutes: 30 | |
| if: github.event.pusher.name != 'dreamkast-cloudnativedays' | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - name: dependencies | |
| run: | | |
| sudo apt update | |
| sudo apt-get install -y libvips42 libmysqlclient21 libyaml-dev | |
| sudo ln -s /usr/lib/x86_64-linux-gnu/libffi.so.7.1.0 /usr/lib/x86_64-linux-gnu/libffi.so.6 | |
| - name: Run database | |
| shell: bash | |
| run: | | |
| docker compose up -d db redis | |
| - name: Set up Node.js | |
| uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 | |
| with: | |
| node-version-file: '.node-version' | |
| cache: 'yarn' | |
| - name: yarn install | |
| run: | | |
| yarn | |
| - name: Run JavaScript tests | |
| run: | | |
| yarn test | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@8d27f39a5e7ad39aebbcbd1324f7af020229645c # v1.287.0 | |
| with: | |
| ruby-version: '.ruby-version' | |
| bundler-cache: true # runs 'bundle install' and caches installed gems automatically | |
| - name: Run rubocop | |
| run: | | |
| bundle exec rubocop | |
| - name: Prepare tests | |
| shell: bash | |
| env: | |
| COVERAGE: true | |
| run: | | |
| bundle exec rails db:create RAILS_ENV=test | |
| bundle exec rails db:environment:set RAILS_ENV=test | |
| bundle exec rails db:migrate RAILS_ENV=test | |
| bundle exec rake ci:check_git_diff | |
| bundle exec rake assets:precompile | |
| - name: Run tests | |
| shell: bash | |
| env: | |
| COVERAGE: true | |
| run: | | |
| bundle exec rspec | |
| - name: Simplecov Report | |
| uses: aki77/simplecov-report-action@7fd5fa551dd583dd437a11c640b2a1cf23d6cdaa # v1.5.2 | |
| with: | |
| failedThreshold: 60 | |
| token: ${{ secrets.GITHUB_TOKEN }} |