Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
interface
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LuckySwap
interface
Commits
b2dfb29f
Unverified
Commit
b2dfb29f
authored
Aug 08, 2023
by
Zach Pomerantz
Committed by
GitHub
Aug 08, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build: simplify/fix test caching (#7084)
* build: rm unnecessary cache-on-main * build: hardhat fan-in cache
parent
097ef6a3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
41 deletions
+27
-41
action.yml
.github/actions/cache-on-main/action.yml
+0
-32
test.yml
.github/workflows/test.yml
+27
-9
No files found.
.github/actions/cache-on-main/action.yml
deleted
100644 → 0
View file @
097ef6a3
name
:
Cache on main
description
:
caches node_modules/.cache, but only saves from main
inputs
:
path
:
description
:
'
A
list
of
files,
directories,
and
wildcard
patterns
to
cache
and
store'
required
:
true
key
:
description
:
'
An
explicit
key
for
restoring
and
saving
the
cache'
required
:
true
restore-keys
:
description
:
'
An
ordered
list
of
keys
to
use
for
restoring
stale
cache
if
no
cache
hit
occured
for
key.
Note
`cache-hit`
returns
false
in
this
case.'
required
:
false
# Many build steps have their own caches to improve subsequent build times.
# Build tools are configured to cache to node_modules/.cache, so they are cached independently of node_modules.
# Caches are saved every run *on main* (by keying on github.run_id), and the most recent available cache is loaded.
# Caches are not saved on feature branches because they have limited utility, and extend the runtime of the workflow.
# See https://jongleberry.medium.com/speed-up-your-ci-and-dx-with-node-modules-cache-ac8df82b7bb0.
runs
:
using
:
composite
steps
:
-
uses
:
actions/cache/restore@v3
with
:
path
:
${{ inputs.path }}
key
:
${{ inputs.key }}
restore-keys
:
${{ inputs.restore-keys }}
-
if
:
github.ref_name == 'main'
uses
:
actions/cache/save@v3
with
:
path
:
${{ inputs.path }}
key
:
${{ inputs.key }}
\ No newline at end of file
.github/workflows/test.yml
View file @
b2dfb29f
...
@@ -18,7 +18,7 @@ jobs:
...
@@ -18,7 +18,7 @@ jobs:
steps
:
steps
:
-
uses
:
actions/checkout@v3
-
uses
:
actions/checkout@v3
-
uses
:
./.github/actions/setup
-
uses
:
./.github/actions/setup
-
uses
:
./.github/actions/cache-on-main
-
uses
:
actions/cache@v3
with
:
with
:
path
:
node_modules/.cache
path
:
node_modules/.cache
key
:
${{ runner.os }}-eslint-${{ github.run_id }}
key
:
${{ runner.os }}-eslint-${{ github.run_id }}
...
@@ -35,7 +35,7 @@ jobs:
...
@@ -35,7 +35,7 @@ jobs:
steps
:
steps
:
-
uses
:
actions/checkout@v3
-
uses
:
actions/checkout@v3
-
uses
:
./.github/actions/setup
-
uses
:
./.github/actions/setup
-
uses
:
./.github/actions/cache-on-main
-
uses
:
actions/cache@v3
with
:
with
:
path
:
node_modules/.cache
path
:
node_modules/.cache
key
:
${{ runner.os }}-tsc-${{ github.run_id }}
key
:
${{ runner.os }}-tsc-${{ github.run_id }}
...
@@ -64,7 +64,7 @@ jobs:
...
@@ -64,7 +64,7 @@ jobs:
steps
:
steps
:
-
uses
:
actions/checkout@v3
-
uses
:
actions/checkout@v3
-
uses
:
./.github/actions/setup
-
uses
:
./.github/actions/setup
-
uses
:
./.github/actions/cache-on-main
-
uses
:
actions/cache@v3
with
:
with
:
path
:
node_modules/.cache
path
:
node_modules/.cache
key
:
${{ runner.os }}-jest-${{ github.run_id }}
key
:
${{ runner.os }}-jest-${{ github.run_id }}
...
@@ -86,7 +86,7 @@ jobs:
...
@@ -86,7 +86,7 @@ jobs:
steps
:
steps
:
-
uses
:
actions/checkout@v3
-
uses
:
actions/checkout@v3
-
uses
:
./.github/actions/setup
-
uses
:
./.github/actions/setup
-
uses
:
./.github/actions/cache-on-main
-
uses
:
actions/cache@v3
with
:
with
:
path
:
node_modules/.swc
path
:
node_modules/.swc
key
:
${{ runner.os }}-swc-${{ github.run_id }}
key
:
${{ runner.os }}-swc-${{ github.run_id }}
...
@@ -103,7 +103,7 @@ jobs:
...
@@ -103,7 +103,7 @@ jobs:
steps
:
steps
:
-
uses
:
actions/checkout@v3
-
uses
:
actions/checkout@v3
-
uses
:
./.github/actions/setup
-
uses
:
./.github/actions/setup
-
uses
:
./.github/actions/cache-on-main
-
uses
:
actions/cache@v3
with
:
with
:
path
:
node_modules/.cache
path
:
node_modules/.cache
key
:
${{ runner.os }}-cypress-tsc-${{ github.run_id }}
key
:
${{ runner.os }}-cypress-tsc-${{ github.run_id }}
...
@@ -131,7 +131,7 @@ jobs:
...
@@ -131,7 +131,7 @@ jobs:
steps
:
steps
:
-
uses
:
actions/checkout@v3
-
uses
:
actions/checkout@v3
-
uses
:
./.github/actions/setup
-
uses
:
./.github/actions/setup
-
uses
:
./.github/actions/cache-on-main
-
uses
:
actions/cache@v3
with
:
with
:
path
:
/root/.cache/Cypress
path
:
/root/.cache/Cypress
key
:
${{ runner.os }}-cypress-${{ hashFiles('**/node_modules/cypress/package.json') }}
key
:
${{ runner.os }}-cypress-${{ hashFiles('**/node_modules/cypress/package.json') }}
...
@@ -144,7 +144,7 @@ jobs:
...
@@ -144,7 +144,7 @@ jobs:
name
:
build
name
:
build
path
:
build
path
:
build
-
uses
:
./.github/actions/cache-on-main
-
uses
:
actions/cache/restore@v3
with
:
with
:
path
:
cache
path
:
cache
key
:
${{ runner.os }}-hardhat-${{ hashFiles('hardhat.config.js') }}-${{ github.run_id }}
key
:
${{ runner.os }}-hardhat-${{ hashFiles('hardhat.config.js') }}-${{ github.run_id }}
...
@@ -179,12 +179,30 @@ jobs:
...
@@ -179,12 +179,30 @@ jobs:
name
:
Cypress tests
name
:
Cypress tests
SLACK_WEBHOOK_URL
:
${{ secrets.SLACK_TEST_REPORTER_WEBHOOK }}
SLACK_WEBHOOK_URL
:
${{ secrets.SLACK_TEST_REPORTER_WEBHOOK }}
-
uses
:
actions/upload-artifact@v3
with
:
name
:
hardhat-cache
path
:
cache
hardhat-cache
:
needs
:
[
cypress-test-matrix
]
runs-on
:
ubuntu-latest
steps
:
-
uses
:
actions/download-artifact@v3
with
:
name
:
hardhat-cache
path
:
cache
-
uses
:
actions/cache/save@v3
with
:
path
:
cache
key
:
${{ runner.os }}-hardhat-${{ hashFiles('hardhat.config.js') }}-${{ github.run_id }}
cloud-typecheck
:
cloud-typecheck
:
runs-on
:
ubuntu-latest
runs-on
:
ubuntu-latest
steps
:
steps
:
-
uses
:
actions/checkout@v3
-
uses
:
actions/checkout@v3
-
uses
:
./.github/actions/setup
-
uses
:
./.github/actions/setup
-
uses
:
./.github/actions/cache-on-main
-
uses
:
actions/cache@v3
with
:
with
:
path
:
node_modules/.cache
path
:
node_modules/.cache
key
:
${{ runner.os }}-cloud-tsc-${{ github.run_id }}
key
:
${{ runner.os }}-cloud-tsc-${{ github.run_id }}
...
@@ -202,7 +220,7 @@ jobs:
...
@@ -202,7 +220,7 @@ jobs:
steps
:
steps
:
-
uses
:
actions/checkout@v3
-
uses
:
actions/checkout@v3
-
uses
:
./.github/actions/setup
-
uses
:
./.github/actions/setup
-
uses
:
./.github/actions/cache-on-main
-
uses
:
actions/cache@v3
with
:
with
:
path
:
node_modules/.cache
path
:
node_modules/.cache
key
:
${{ runner.os }}-cloud-jest-${{ github.run_id }}
key
:
${{ runner.os }}-cloud-jest-${{ github.run_id }}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment