Skip to content

Commit

Permalink
ci: cache
Browse files Browse the repository at this point in the history
  • Loading branch information
sorah committed May 12, 2020
1 parent 255e71a commit 9e07b10
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
22 changes: 18 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,16 @@ jobs:
container:
image: sorah/ruby:${{ matrix.ruby-version }}-dev
steps:

- name: Cache bundled gems
uses: actions/cache@v1
id: rspec-bundle
with:
path: ~/bundle
key: ${{ runner.os }}-${{ matrix.ruby-version }}

- uses: actions/checkout@master
- run: 'bundle install'
- run: 'bundle install --path ~/bundle'
- run: 'bundle exec rspec -fd'

integration-pebble:
Expand Down Expand Up @@ -55,11 +63,17 @@ jobs:

steps:
- uses: actions/checkout@master

- name: Cache bundled gems
uses: actions/cache@v1
id: instegration-pebble-bundle
with:
path: ~/bundle
key: ${{ runner.os }}-${{ matrix.ruby-version }}

- run: 'docker run -d --net=host --rm letsencrypt/pebble pebble -config /test/config/pebble-config.json -strict -dnsserver 127.0.0.1:8053'
- run: 'docker run -d --net=host --rm letsencrypt/pebble-challtestsrv pebble-challtestsrv -management :8055 -defaultIPv4 127.0.0.1'
- run: 'sed -e "s|RUBY_VERSION|${{ matrix.ruby-version}}|g" spec/integration/pebble/Dockerfile.ci > /tmp/Dockerfile.ci'
- run: 'docker build -t test -f /tmp/Dockerfile.ci .'
- run: 'docker run --net=host -e CI --rm test bundle exec rspec -fd -t integration_pebble'
- run: 'docker run --net=host -e CI --rm -v $(pwd):/work -v $(realpath ~/bundle):/bundle sorah/ruby:${{ matrix.ruby-version }}-dev sh -c "cd /work && bundle install --path /bundle && bundle exec rspec -fd -t integration_pebble"'

docker-build:
name: docker-build
Expand Down
5 changes: 0 additions & 5 deletions spec/integration/pebble/Dockerfile.ci

This file was deleted.

0 comments on commit 9e07b10

Please sign in to comment.