Skip to content

Commit

Permalink
try new ruby-docker-technique
Browse files Browse the repository at this point in the history
  • Loading branch information
papes1ns committed Apr 17, 2024
1 parent b3b990c commit 23721cb
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 1 deletion.
41 changes: 41 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: ci

on:
workflow_dispatch:
pull_request:

jobs:
ci:
name: Build and run tests with containers
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: docker/setup-buildx-action@v3

- uses: docker/build-push-action@v5
with:
context: .
push: false
load: true
cache-from: type=gha
cache-to: type=gha,mode=max
tags: galahq/gala:latest

- name: Docker Compose up
run: docker-compose up -d

- name: List running Docker containers
run: docker ps

- name: Run Tests
run: docker exec -e RAILS_ENV=test app_web_1 bundle exec rspec --exclude-pattern="**/features/*_spec.rb"

- name: Docker Compose down
run: docker-compose down

- if: always()
uses: ouzi-dev/[email protected]
with:
name: Test
status: "${{ job.status }}"
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: '3'
version: '3.8'
services:
web: &web
build: ./
Expand Down

0 comments on commit 23721cb

Please sign in to comment.