Hw12 harb #304
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: main | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:11-alpine | |
ports: | |
- "5432:5432" | |
env: | |
POSTGRES_DB: rails_test | |
POSTGRES_USER: rails | |
POSTGRES_PASSWORD: password | |
env: | |
DATABASE_URL: "postgres://rails:password@localhost:5432/rails_test" | |
RAILS_ENV: test | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
- name: Set up database schema | |
run: bin/rails db:schema:load | |
- name: Run rubocop | |
run: bin/rubocop | |
- name: Run slim linter | |
run: bin/slim-lint app/views | |
- name: Run scss linter | |
run: bin/scss-lint app/assets/stylesheets | |
- name: Run tests | |
run: bin/rspec | |
... |