From 23721cb4977218a474a32157869aaa8daaa02647 Mon Sep 17 00:00:00 2001 From: Nathan Papes Date: Wed, 17 Apr 2024 18:46:10 -0400 Subject: [PATCH] try new ruby-docker-technique --- .github/workflows/ci.yml | 41 ++++++++++++++++++++++++++++++++++++++++ docker-compose.yml | 2 +- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..1e75a731f --- /dev/null +++ b/.github/workflows/ci.yml @@ -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/commit-status-updater@v1.1.0 + with: + name: Test + status: "${{ job.status }}" \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 22ed7cd1b..f2fc49b4c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,4 @@ -version: '3' +version: '3.8' services: web: &web build: ./