feat(certification): add ability to set bonuses on ship reviews #2190
Workflow file for this run
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: | |
| 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.3 | |
| - 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.312.0 | |
| 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 | |
| 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.3 | |
| - name: Install system dependencies | |
| run: sudo apt-get update && sudo apt-get install -y libblas-dev liblapack-dev | |
| - uses: ruby/setup-ruby@v1.312.0 | |
| with: | |
| ruby-version: .ruby-version | |
| bundler-cache: true | |
| - name: Check schema matches migrations | |
| run: | | |
| bundle exec rails db:migrate | |
| if ! git diff --exit-code db/schema.rb; then | |
| echo "### :rage2: you GOOF!" >> $GITHUB_STEP_SUMMARY | |
| echo "Schema dump has fallen out of date." >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo 'Run `rails db:migrate` locally and commit the changes to `db/schema.rb`.' >> $GITHUB_STEP_SUMMARY | |
| exit 1 | |
| fi | |
| - name: Check annotations are up to date | |
| run: | | |
| if ! bundle exec annotaterb models --frozen; then | |
| echo "### :rage1: you SILLY GOOSE!" >> $GITHUB_STEP_SUMMARY | |
| echo "Model annotations have fallen out of date." >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo 'Run `bundle exec annotaterb models` locally and commit the changes.' >> $GITHUB_STEP_SUMMARY | |
| exit 1 | |
| fi |