switch to vite rails #481
Workflow file for this run
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: CI | |
on: [push] | |
env: | |
RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }} | |
jobs: | |
ruby: | |
runs-on: ubuntu-20.04 | |
services: | |
postgres: | |
image: postgres:12 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: app | |
ports: | |
- 5432:5432 | |
# needed because the postgres container does not provide a healthcheck | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: '16.x' | |
cache: yarn | |
- name: Install yarn | |
run: yarn install | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
- name: Lint | |
run: bundle exec rubocop | |
- name: Translations Lint | |
run: bundle exec i18n-tasks health | |
- name: Check Model Annotations | |
run: bundle exec annotate --models && bin/git_tracked_are_unmodified | |
env: | |
DATABASE_URL: postgres://postgres:[email protected]:5432/app | |
RAILS_ENV: test | |
- name: JS Lint | |
run: yarn lint | |
- name: Build Assets | |
run: yarn build | |
- name: Create PG Database | |
run: bundle exec rake db:create db:migrate | |
env: | |
DATABASE_URL: postgres://postgres:[email protected]:5432/app | |
RAILS_ENV: test | |
- name: Build and test with Rake | |
run: bundle exec rspec --format documentation | |
env: | |
DATABASE_URL: postgres://postgres:[email protected]:5432/app | |
RAILS_ENV: test | |
RSPEC_RETRY_RETRY_COUNT: 3 | |
SCREENSHOTS: '1' | |
- name: Upload Screenshots | |
if: always() | |
run: | | |
(cd doc/screenshots; zip -r ../../screenshots.zip .) | |
curl -X POST "https://screamshot.nerdgeschoss.de/projects/r4qn4uHa5R84AoZQpDsgCSbe/versions" -F "name=\"$GITHUB_REF\"" -F "[email protected]" -F "iteration=\"$GITHUB_SHA\"" |