Skip to content

chore(project): drop unused project_categories column (follow-up to #360) #1733

chore(project): drop unused project_categories column (follow-up to #360)

chore(project): drop unused project_categories column (follow-up to #360) #1733

Workflow file for this run

name: CI
on:
push:
branches: [main, platform]
pull_request:
merge_group:
permissions:
contents: read
env:
BUNDLE_WITHOUT: development
jobs:
checks:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- name: Brakeman
system_packages: "libblas-dev liblapack-dev"
command: bin/brakeman --no-pager
- name: RuboCop
system_packages: "libblas-dev liblapack-dev"
needs_node: true
command: bin/rubocop -f github
- name: ERB Lint
system_packages: "libblas-dev liblapack-dev"
needs_node: true
command: bundle exec erb_lint --lint-all
- name: Prettier JS/TS
system_packages: "libblas-dev liblapack-dev"
needs_node: true
command: yarn prettier --check "app/javascript/**/*.{js,jsx,ts,tsx}"
- name: Prettier SCSS/CSS
system_packages: "libblas-dev liblapack-dev"
needs_node: true
command: yarn prettier --check "app/assets/stylesheets/**/*.{scss,css}"
- name: Zeitwerk
system_packages: "libvips-dev libblas-dev liblapack-dev"
rails_env: test
command: bin/rails zeitwerk:check
name: ${{ matrix.name }}
steps:
- name: Checkout code
uses: actions/checkout@v6.0.2
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y ${{ matrix.system_packages }}
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: .ruby-version
bundler-cache: true
- name: Set up Node.js
if: matrix.needs_node
uses: actions/setup-node@v6
with:
node-version-file: package.json
- name: Enable Corepack
if: matrix.needs_node
run: corepack enable
- name: Install JS dependencies
if: matrix.needs_node
run: yarn install --immutable
- name: Run check
env:
RAILS_ENV: ${{ matrix.rails_env || '' }}
run: ${{ matrix.command }}
db_checks:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
services:
postgres:
image: pgvector/pgvector:pg16
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: stardance_test
ports:
- 5432:5432
options: --health-cmd="pg_isready" --health-interval=10s --health-timeout=5s --health-retries=3
env:
RAILS_ENV: test
DATABASE_URL: postgresql://postgres:password@localhost:5432/stardance_test
steps:
- uses: actions/checkout@v6.0.2
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y libblas-dev liblapack-dev
- uses: ruby/setup-ruby@v1
with:
ruby-version: .ruby-version
bundler-cache: true
- name: Check schema matches migrations
id: migration_check
run: |
bundle exec rails db:migrate
git diff --exit-code db/schema.rb
- name: Comment on schema failure
if: failure() && steps.migration_check.outcome == 'failure' && github.event_name == 'pull_request'
uses: actions/github-script@v9
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `### :rage2: you GOOF!\n Schema dump has fallen out of date\n\nRun \`rails db:migrate\` locally and commit the changes to \`db/schema.rb\`.`
});
- name: Check annotations are up to date
id: annotate_check
if: success()
run: bundle exec annotaterb models --frozen
- name: Comment on annotation failure
if: failure() && steps.annotate_check.outcome == 'failure' && github.event_name == 'pull_request'
uses: actions/github-script@v9
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `### :rage1: you SILLY GOOSE!\nModel annotations have fallen out of date.\n\nPlease run \`bundle exec annotaterb models\` locally and commit the changes.`
});