Skip to content

Commit

Permalink
try different layer caching tool
Browse files Browse the repository at this point in the history
  • Loading branch information
papes1ns committed Apr 17, 2024
1 parent 346cab5 commit bb249ef
Showing 1 changed file with 12 additions and 23 deletions.
35 changes: 12 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,29 @@
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: actions/checkout@v4

- uses: docker/setup-buildx-action@v3
- uses: satackey/[email protected]
# Ignore the failure of a step and avoid terminating the job.
continue-on-error: true

- name: Build Docker image
- name: Build Docker images
run: |
DOCKER_BUILDKIT=1 docker build -t gala_web .
- uses: docker/build-push-action@v5
with:
context: .
push: false
cache-from: type=gha,scope=${{ github.repository }}
cache-to: type=gha,mode=max,scope=${{ github.repository }}
tags: gala_web
docker-compose build
- name: Docker Compose up
- name: Run with Docker Compose
run: docker-compose up -d

- name: List running Docker containers
run: docker ps

- name: Run Tests
run: |
docker exec -e RAILS_ENV=test gala_web_1 bundle exec rails db:test:prepare
docker exec -e RAILS_ENV=test gala_web_1 bundle exec rspec --exclude-pattern="**/features/*_spec.rb"

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

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

0 comments on commit bb249ef

Please sign in to comment.