Skip to content

Merge pull request #553 from dxw/update-spring-for-rails7 #1342

Merge pull request #553 from dxw/update-spring-for-rails7

Merge pull request #553 from dxw/update-spring-for-rails7 #1342

# TODO: Enable GitHub Actions on the repository to test all pull requests
# https://github.com/<org>/<repo>/actions
on:
pull_request:
push:
branches:
- main
- develop
jobs:
test:
runs-on: ubuntu-latest
env:
RAILS_ENV: test
steps:
- name: Check out code
uses: actions/checkout@v2
- id: cache-docker
uses: actions/cache@v2
with:
path: /tmp/docker-save
key:
docker-save-${{ hashFiles('Dockerfile', 'Gemfile.lock',
'package-lock.json') }}
- if: steps.cache-docker.outputs.cache-hit == 'true'
name: Load cached Docker image
run: docker load -i /tmp/docker-save/snapshot.tar || true
- name: Build
run: script/ci/cibuild
- name: Test
run: script/ci/test
- if: always() && steps.cache-docker.outputs.cache-hit != 'true'
name: Prepare Docker cache
run:
mkdir -p /tmp/docker-save && docker save app_test:latest -o
/tmp/docker-save/snapshot.tar && ls -lh /tmp/docker-save