Pipeline #810
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: Pipeline | |
on: | |
pull_request: | |
types: [opened,synchronize] | |
schedule: | |
- cron: '30 10 * * 1,3,5' | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
js-lint: | |
name: JS Lint | |
permissions: | |
contents: read | |
pull-requests: read | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Install Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Install MarkdownLint | |
run: npm install -g markdownlint-cli | |
- name: Checking markdown | |
run: markdownlint . | |
lint: | |
name: Lint | |
permissions: | |
contents: read | |
pull-requests: read | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Install Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
ruby-version: .ruby-version | |
- name: Fasterer | |
run: bundle exec fasterer | |
- name: I18n tasks health | |
run: bundle exec i18n-tasks health | |
- name: Rails Best Practices | |
run: bundle exec rails_best_practices | |
- name: Rubocop | |
run: bundle exec rubocop --parallel | |
message-check: | |
name: Block Autosquash Commits | |
permissions: | |
pull-requests: read | |
runs-on: ubuntu-latest | |
steps: | |
- name: Block Autosquash Commits | |
if: github.event_name == 'pull_request' | |
uses: xt0rted/block-autosquash-commits-action@v2 | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
rspec: | |
name: Rspec tests | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
services: | |
postgres: | |
image: postgres:14 | |
env: | |
POSTGRES_HOST: 127.0.0.1 | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_USER: postgres | |
POSTGRES_DB: postgres | |
ports: | |
- 5432:5432 | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Download system package lists | |
run: sudo apt-get update | |
- name: Install system dependencies | |
run: sudo apt-get install -y --no-install-recommends libvips42 | |
shell: bash | |
- name: Install Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
ruby-version: .ruby-version | |
- name: Install dependencies | |
run: | | |
gem install bundler | |
bundle install --jobs 4 --retry 3 | |
- name: Setup database | |
env: | |
RAILS_ENV: test | |
run: | | |
cp config/database.ci.yml config/database.yml | |
bundle exec rails db:create | |
bundle exec rails db:schema:load | |
- name: Run tests | |
env: | |
RAILS_ENV: test | |
run: | |
bundle exec rspec spec |