Skip to content

Commit

Permalink
Merge pull request #1677 from tvdeyen/cache-apt-on-ci
Browse files Browse the repository at this point in the history
Cache apt packages between CI runs
  • Loading branch information
tvdeyen authored Nov 20, 2019
2 parents ce52e4d + 90ee6df commit d4fc370
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,24 @@ jobs:
uses: actions/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Restore apt cache
id: apt-cache
uses: actions/cache@preview
with:
path: /home/runner/apt/cache
key: ${{ runner.os }}-apt-${{ matrix.database }}
restore-keys: |
${{ runner.os }}-apt-
- name: Install Postgres headers
if: matrix.database == 'postgresql'
run: |
sudo apt-get install -yqq libpq-dev
sudo apt-get update -qq
sudo apt-get install -qq --fix-missing libpq-dev -o dir::cache::archives="/home/runner/apt/cache"
- name: Install MySQL headers
if: matrix.database == 'mysql'
run: |
sudo apt-get install -yqq libmysqlclient-dev
sudo apt-get update -qq
sudo apt-get install -qq --fix-missing libmysqlclient-dev -o dir::cache::archives="/home/runner/apt/cache"
- name: Install bundler
run: |
gem install bundler
Expand Down

0 comments on commit d4fc370

Please sign in to comment.