Skip to content

Bootstrapped Sinatra API, Vite/TS SPA and CI #1

Bootstrapped Sinatra API, Vite/TS SPA and CI

Bootstrapped Sinatra API, Vite/TS SPA and CI #1

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
ruby:
name: Ruby ${{ matrix.ruby }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby: ['3.2', '3.3']
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: RuboCop
run: bundle exec rubocop --format github
- name: RSpec
run: bundle exec rspec
web:
name: Web (Node ${{ matrix.node }})
runs-on: ubuntu-latest
defaults:
run:
working-directory: web
strategy:
fail-fast: false
matrix:
node: ['20', '22']
steps:
- uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: npm
cache-dependency-path: web/package-lock.json
- name: Install dependencies
run: npm ci || npm install
- name: Typecheck
run: npm run typecheck
- name: Lint
run: npm run lint
- name: Format check
run: npm run format:check
- name: Unit tests
run: npm test
- name: Build
run: npm run build