mirror of
https://github.com/manyfold3d/manyfold.git
synced 2026-10-22 19:52:18 -05:00
59 lines
1.6 KiB
YAML
59 lines
1.6 KiB
YAML
name: Ruby
|
|
|
|
on:
|
|
push:
|
|
branches: [ "main" ]
|
|
pull_request:
|
|
branches: [ "main" ]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: ./.github/actions/setup
|
|
- name: Remove data schema so we bootstrap from zero with data migrations
|
|
run: rm db/data_schema.rb
|
|
- name: Set up database with prepare command so we catch any migration explosions
|
|
run: bundle exec rails db:prepare:with_data
|
|
env:
|
|
RAILS_ENV: test
|
|
- name: Check typescript
|
|
run: yarn typecheck
|
|
- name: Compile assets
|
|
run: bundle exec rails assets:precompile
|
|
- name: Run tests
|
|
run: bundle exec rake
|
|
- name: Upload Coverage
|
|
env:
|
|
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
|
|
run: bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r coverage/coverage.xml
|
|
services:
|
|
redis:
|
|
image: redis
|
|
options: >-
|
|
--health-cmd "redis-cli ping"
|
|
--health-interval 10s
|
|
--health-timeout 5s
|
|
--health-retries 5
|
|
ports:
|
|
- 6379:6379
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: ./.github/actions/setup
|
|
- name: Lint Ruby code
|
|
run: bundle exec rake rubocop
|
|
- name: Lint ERB templates
|
|
run: bundle exec erb_lint --lint-all
|
|
- name: Lint Typescript code
|
|
run: yarn run lint:ts
|
|
i18n:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: ./.github/actions/setup
|
|
- name: Check translations
|
|
run: bundle exec i18n-tasks health -l en
|