From 13891b7d18d7f7adcb8f5a477aac76bedc729dfc Mon Sep 17 00:00:00 2001 From: "byte[]" Date: Mon, 30 Nov 2020 21:40:30 -0500 Subject: [PATCH] improve execution time for github test workflow --- .github/workflows/elixir.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/elixir.yml b/.github/workflows/elixir.yml index cc691dc4..736e0e74 100644 --- a/.github/workflows/elixir.yml +++ b/.github/workflows/elixir.yml @@ -7,5 +7,23 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + + - uses: actions/cache@v2 + with: + path: | + _build + deps + key: ${{ runner.os }}-build-deps-${{ hashFiles('mix.lock') }} + + - run: docker-compose pull + + - uses: satackey/action-docker-layer-caching@v0.0.8 + continue-on-error: true + - name: Build and test run: docker-compose run app run-test + + - name: Fix permissions + run: | + sudo chown -R $(whoami):$(id -ng) deps + sudo chown -R $(whoami):$(id -ng) _build