Skip to content

RSpec CI

RSpec CI #1

Workflow file for this run

name: RSpec CI
on:
# allow running action manually
workflow_dispatch:
# trigger on push to master branch
pull_request:
branches:
- main
jobs:
CI:
runs-on: ubuntu-latest
permissions:
packages: read
steps:
- name: Create folders
run: |
mkdir -p /opt/workshops/
cd /opt/workshops
# Checkout the repository code
- name: Check out repository code
uses: actions/checkout@v4
- name: Start Docker containers
run: |
docker compose up --wait
- name: Create dev/test databases
run: |
docker exec $(docker ps --filter 'name=rails' -q) bash -lc "bundle exec rails db:create"
- name: Migrate dev/test databases
run: |
docker exec $(docker ps --filter 'name=rails' -q) bash -lc "bundle exec rails db:migrate"
- name: Run RSpec tests
run: |
docker exec $(docker ps --filter 'name=rails' -q) bash -lc "bundle exec rspec"