mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-24 11:01:41 +01:00
ac8825b5b1
GitHub actions that install dependencies will now also cache those dependencies using the standard strategy for Yarn (which is to hash the lockfile). This matches the module template (see https://github.com/MetaMask/metamask-module-template/pull/145 for details). This should have no functional impact except that this action will run faster when dependencies are unchanged.
36 lines
1011 B
YAML
36 lines
1011 B
YAML
name: Fitness Functions CI
|
|
|
|
on:
|
|
pull_request:
|
|
types: [assigned, opened, synchronize, reopened]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Use Node.js
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version-file: '.nvmrc'
|
|
cache: yarn
|
|
|
|
- name: Install dependencies
|
|
run: yarn --immutable
|
|
|
|
- name: Run fitness functions
|
|
env:
|
|
BASE_REF: ${{ github.event.pull_request.base.ref }}
|
|
run: |
|
|
# The following command generates a diff of changes between the common
|
|
# ancestor of $BASE_REF and HEAD, and the current commit (HEAD), for
|
|
# files in the current directory and its subdirectories. The output is
|
|
# then saved to a file called "diff".
|
|
git diff "$(git merge-base "origin/$BASE_REF" HEAD)" HEAD -- . > ./diff
|
|
npm run fitness-functions -- "ci" "./diff"
|