Skip to content

Commit

Permalink
Cache apt packages between CI runs
Browse files Browse the repository at this point in the history
  • Loading branch information
tvdeyen committed Nov 20, 2019
1 parent ce52e4d commit 58d6396
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,26 @@ 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
mkdir -p /home/runner/apt/cache
sudo apt-get update -qq -o dir::state::lists="/home/runner/apt/cache"
sudo apt-get install -yqq 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
mkdir -p /home/runner/apt/cache
sudo apt-get update -qq -o dir::state::lists="/home/runner/apt/cache"
sudo apt-get install -yqq libmysqlclient-dev -o dir::cache::archives="/home/runner/apt/cache"
- name: Install bundler
run: |
gem install bundler
Expand Down

0 comments on commit 58d6396

Please sign in to comment.