diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index dd7aeb28..5caf8d1f 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -10,9 +10,20 @@ jobs: - uses: actions/checkout@v1 - uses: actions/setup-node@v1 with: - node-version: "11.x" + node-version: "12.x" + - name: Cache node modules + uses: actions/cache@v1 + env: + cache-name: cache-solidity-node-modules + with: + path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- - name: Install dependencies - run: npm install + run: npm ci - name: Run JS linter run: npm run lint:js @@ -23,8 +34,19 @@ jobs: - uses: actions/checkout@v1 - uses: actions/setup-node@v1 with: - node-version: "11.x" + node-version: "12.x" + - name: Cache node modules + uses: actions/cache@v1 + env: + cache-name: cache-solidity-node-modules + with: + path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- - name: Install dependencies - run: npm install + run: npm ci - name: Run Solidity linter run: npm run lint:sol diff --git a/.github/workflows/solidity-test.yml b/.github/workflows/solidity-test.yml index 4c865d50..483bc86e 100644 --- a/.github/workflows/solidity-test.yml +++ b/.github/workflows/solidity-test.yml @@ -10,9 +10,20 @@ jobs: - uses: actions/checkout@v1 - uses: actions/setup-node@v1 with: - node-version: "11.x" + node-version: "12.x" + - name: Cache node modules + uses: actions/cache@v1 + env: + cache-name: cache-solidity-node-modules + with: + path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- - name: Install dependencies - run: npm install + run: npm ci - name: Run tests # Runs ganache in background run: |