Skip to content

Commit 8fd7346

Browse files
committed
Revert change to check.yml
1 parent 25524bb commit 8fd7346

File tree

1 file changed

+11
-115
lines changed

1 file changed

+11
-115
lines changed

.github/workflows/check.yml

+11-115
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ name: Checks
44
# Sets the ENV `MIX_ENV` to `test` for running tests
55
env:
66
MIX_ENV: test
7-
# Artificially refresh the cache
8-
DEPENDENCIES_CACHE_VERSION: 1
9-
PLT_CACHE_VERSION: 1
107

118
permissions:
129
contents: read
@@ -59,81 +56,9 @@ jobs:
5956
cache-name: cache-elixir-deps
6057
with:
6158
path: deps
62-
key: ${{ runner.os }}-mix-${{ env.cache-name }-${{ env.DEPENDENCIES_CACHE_VERSION }}}-${{ hashFiles('**/mix.lock') }}
63-
restore-keys: |
64-
${{ runner.os }}-mix-${{ env.cache-name }}-${{ env.DEPENDENCIES_CACHE_VERSION }}-
65-
66-
# Step: Define how to cache the `_build` directory. After the first run,
67-
# this speeds up tests runs a lot. This includes not re-compiling our
68-
# project's downloaded deps every run.
69-
- name: Cache compiled build
70-
id: cache-build
71-
uses: actions/cache@v3
72-
env:
73-
cache-name: cache-compiled-build
74-
with:
75-
path: _build
76-
key: ${{ runner.os }}-mix-${{ env.cache-name }}-${{ env.DEPENDENCIES_CACHE_VERSION }}-${{ hashFiles('**/mix.lock') }}
77-
restore-keys: |
78-
${{ runner.os }}-mix-${{ env.cache-name }}-${{ env.DEPENDENCIES_CACHE_VERSION }}-
79-
${{ runner.os }}-mix-
80-
81-
# Step: Conditionally bust the cache when job is re-run. Sometimes, we
82-
# may have issues with incremental builds that are fixed by doing a full
83-
# recompile. In order to not waste dev time on such trivial issues (while
84-
# also reaping the time savings of incremental builds for *most*
85-
# day-to-day development), force a full recompile only on builds that are
86-
# retried.
87-
- name: Clean to rule out incremental build as a source of flakiness
88-
if: github.run_attempt != '1'
89-
run: |
90-
mix deps.clean --all
91-
mix clean
92-
shell: sh
93-
94-
# Step: Download project dependencies. If unchanged, uses the cached
95-
# version.
96-
- name: Install dependencies
97-
run: mix deps.get
98-
99-
# Step: Compile the project treating any warnings as errors.
100-
- name: Compiles without warnings
101-
run: mix compile --warnings-as-errors
102-
103-
# Step: Setup the database for the tests.
104-
- name: Setup db
105-
run: mix ecto.setup
106-
107-
# Step: Execute the tests.
108-
- name: Run tests
109-
run: mix test
110-
111-
ensure_code_consistency:
112-
runs-on: ubuntu-latest
113-
name: Test on OTP ${{matrix.otp}} / Elixir ${{matrix.elixir}}
114-
steps:
115-
# Step: Setup Elixir + Erlang image as the base.
116-
- name: Set up Elixir
117-
uses: erlef/setup-beam@v1
118-
with:
119-
otp-version: ${{matrix.otp}}
120-
elixir-version: ${{matrix.elixir}}
121-
122-
# Step: Check out the code.
123-
- name: Checkout code
124-
uses: actions/checkout@v3
125-
126-
# Step: Define how to cache deps. Restores existing cache if present.
127-
- name: Cache deps
128-
id: cache-deps
129-
uses: actions/cache@v3
130-
env:
131-
cache-name: cache-elixir-deps
132-
with:
133-
path: deps
134-
key: ${{ runner.os }}-mix-${{ env.cache-name }}-${{ env.DEPENDENCIES_CACHE_VERSION }}-${{ hashFiles('**/mix.lock') }}
59+
key: ${{ runner.os }}-mix-${{ env.cache-name }}-${{ hashFiles('**/mix.lock') }}
13560
restore-keys: |
136-
${{ runner.os }}-mix-${{ env.cache-name }}-${{ env.DEPENDENCIES_CACHE_VERSION }}-
61+
${{ runner.os }}-mix-${{ env.cache-name }}-
13762
13863
# Step: Define how to cache the `_build` directory. After the first run,
13964
# this speeds up tests runs a lot. This includes not re-compiling our
@@ -161,7 +86,7 @@ jobs:
16186
run: |
16287
mix deps.clean --all
16388
mix clean
164-
shell: s
89+
shell: sh
16590

16691
# Step: Download project dependencies. If unchanged, uses the cached
16792
# version.
@@ -172,47 +97,18 @@ jobs:
17297
- name: Compiles without warnings
17398
run: mix compile --warnings-as-errors
17499

175-
# Step: Check that the code has already been formatted.
100+
# Step: Check that the checked in code has already been formatted.
176101
- name: Check Formatting
177102
run: mix format --check-formatted
178103

179-
# Step: Check that the code complies with the credo rules.
104+
# Step: Check that the checked in code complies with the credo rules.
180105
- name: Check Credo
181106
run: mix credo -A
182107

183-
# Step: Check that the documentation and specs complies with the doctor rules.
184-
- name: Check Doctor
185-
run: mix doctor
186-
187-
# Don't cache PLTs based on mix.lock hash, as Dialyzer can incrementally update even old ones
188-
# Cache key based on Elixir & Erlang version (also useful when running in matrix)
189-
- name: Restore PLT cache
190-
uses: actions/cache/restore@v4
191-
id: plt_cache
192-
with:
193-
key: |
194-
plt-${{ runner.os }}-${{ env.PLT_CACHE_VERSION }}
195-
restore-keys: |
196-
plt-${{ runner.os }}-${{ env.PLT_CACHE_VERSION }}
197-
path: |
198-
priv/plts
199-
200-
# Create PLTs if no cache was found
201-
- name: Create PLTs
202-
if: steps.plt_cache.outputs.cache-hit != 'true'
203-
run: mix dialyzer --plt
204-
205-
# By default, the GitHub Cache action will only save the cache if all steps in the job succeed,
206-
# so we separate the cache restore and save steps in case running dialyzer fails.
207-
- name: Save PLT cache
208-
uses: actions/cache/save@v4
209-
if: steps.plt_cache.outputs.cache-hit != 'true'
210-
id: plt_cache_save
211-
with:
212-
key: |
213-
plt-${{ runner.os }}-${{ env.PLT_CACHE_VERSION }}
214-
path: |
215-
priv/plts
108+
# Step: Setup the database for the tests.
109+
- name: Setup db
110+
run: mix ecto.setup
216111

217-
- name: Run dialyzer
218-
run: mix dialyzer --format raw
112+
# Step: Execute the tests.
113+
- name: Run tests
114+
run: mix test

0 commit comments

Comments
 (0)