mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 18:18:55 +00:00
Don't cache Elixir build in static_analysis workflow (#1227)
Still [having issues](https://github.com/firezone/firezone/actions/runs/3759257641) with the Elixir cache. Things tried that didn't work: - Namespacing by branch name. Github does this already. - Removing the `restore-keys` in order to only restore the cache if it's a direct hit. The `static_analysis` workflow runs `mix compile --force --warnings-as-errors` which doesn't use the build cache, so it's removed, which fixes the problem.
This commit is contained in:
16
.github/workflows/static_analysis.yml
vendored
16
.github/workflows/static_analysis.yml
vendored
@@ -29,15 +29,17 @@ jobs:
|
||||
with:
|
||||
otp-version: '25'
|
||||
elixir-version: '1.14'
|
||||
- uses: actions/cache@v3.0.11
|
||||
name: Setup Elixir cache
|
||||
- uses: actions/cache@v3
|
||||
name: Elixir Deps Cache
|
||||
env:
|
||||
cache-name: cache-elixir-deps
|
||||
with:
|
||||
path: |
|
||||
deps
|
||||
_build
|
||||
key: ${{ runner.os }}-${{ github.ref }}-mix-otp-25-${{ hashFiles('**/mix.lock') }}
|
||||
# XXX: We've purposefully omitted caching the _build directory here because we
|
||||
# force-recompile in the pre-commit run below in order to catch any compilation warnings.
|
||||
path: deps
|
||||
key: ${{ github.workflow }}-${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/mix.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-${{ github.ref }}-mix-otp-25-${{ hashFiles('**/mix.lock') }}
|
||||
${{ github.workflow }}-${{ runner.os }}-${{ env.cache-name }}-
|
||||
- uses: actions/cache@v3.0.11
|
||||
name: Setup ruby cache
|
||||
with:
|
||||
|
||||
20
.github/workflows/test.yml
vendored
20
.github/workflows/test.yml
vendored
@@ -36,14 +36,22 @@ jobs:
|
||||
with:
|
||||
otp-version: '25'
|
||||
elixir-version: '1.14'
|
||||
- uses: actions/cache@v3.0.11
|
||||
- uses: actions/cache@v3
|
||||
name: Elixir Deps Cache
|
||||
env:
|
||||
cache-name: cache-elixir-deps
|
||||
with:
|
||||
path: |
|
||||
deps
|
||||
_build
|
||||
key: ${{ runner.os }}-${{ github.ref }}-mix-otp-25-${{ hashFiles('**/mix.lock') }}
|
||||
path: deps
|
||||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/mix.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-${{ github.ref }}-mix-otp-25-${{ hashFiles('**/mix.lock') }}
|
||||
${{ runner.os }}-${{ env.cache-name }}-
|
||||
- uses: actions/cache@v3
|
||||
name: Elixir Build Cache
|
||||
env:
|
||||
cache-name: cache-elixir-build
|
||||
with:
|
||||
path: _build
|
||||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/mix.lock') }}
|
||||
- name: Install Dependencies
|
||||
run: mix deps.get --only $MIX_ENV
|
||||
- name: Setup Database
|
||||
|
||||
Reference in New Issue
Block a user