Add LT link #2794
Workflow file for this run
This file contains 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 | |
if: github.event.pusher.name != 'dreamkast-cloudnativedays' | |
steps: | |
- uses: actions/checkout@v4 | |
- 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@v4 | |
with: | |
node-version-file: '.node-version' | |
cache: 'yarn' | |
- name: yarn install | |
run: | | |
yarn | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
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@v1 | |
with: | |
failedThreshold: 60 | |
token: ${{ secrets.GITHUB_TOKEN }} |