Skip to content

Dockerfile

Dockerfile #233

Workflow file for this run

name: Tests
on:
push:
branches: [ main ]
pull_request:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
jobs:
tests:
name: 'Run specs'
runs-on: ubuntu-latest
services:
postgres:
image: postgres:13-alpine
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- 5432:5432
options: >-
--mount type=tmpfs,destination=/var/lib/postgresql/data
--health-cmd pg_isready
--health-interval 1s
--health-timeout 1s
--health-retries 10
env:
HANAMI_ENV: test
DATABASE_URL: postgres://postgres:postgres@localhost:5432/postgres
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2.2'
bundler-cache: true
- uses: actions/setup-node@v3
with:
node-version: '16.18.0'
- run: npm install yarn -g
- name: Yarn cache
uses: actions/cache@v3
id: yarn-cache
with:
path: node_modules
key: yarn-${{ hashFiles('./yarn.lock') }}
restore-keys: |
yarn-
- run: yarn install --frozen-lockfile
- run: bundle exec rake db:migrate
- run: bundle exec hanami assets compile
- run: bundle exec rspec
- run: bundle exec standardrb