Skip to content

Fix specs even more #506

Fix specs even more

Fix specs even more #506

Workflow file for this run

name: CI
on: [push]
env:
RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }}
RAILS_ENV: test
DATABASE_URL: postgres://postgres:postgres@127.0.0.1:5432/app
RSPEC_RETRY_RETRY_COUNT: 3
SCREENSHOTS: '1'
jobs:
ruby:
runs-on: ubuntu-20.04
services:
postgres:
image: postgres:15
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: '18.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
- name: JS Lint
run: yarn lint
- name: Install Playwright Browsers
run: npx --yes playwright install --with-deps chromium
- name: Build
run: bundle exec rails assets:precompile
- name: Create PG Database
run: bundle exec rake db:create db:migrate
- name: Build and test with RSpec
run: bundle exec rspec --format documentation
- 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 "file=@screenshots.zip" -F "iteration=\"$GITHUB_SHA\""